Tweakers maakt gebruik van cookies, onder andere om de website te analyseren, het gebruiksgemak te vergroten en advertenties te tonen. Door gebruik te maken van deze website, of door op 'Ga verder' te klikken, geef je toestemming voor het gebruik van cookies. Je kunt ook een cookievrije versie van de website bezoeken met minder functionaliteit. Wil je meer informatie over cookies en hoe ze worden gebruikt, bekijk dan ons cookiebeleid.

Meer informatie

  • Gtoniser
  • Registratie: januari 2008
  • Laatst online: 20:16
Ok, het probleem is het volgende.
Ik beheer de servers van een website waar naast embedded content ook video streams worden aangeboden (mp4).
Deze werken ook op de iPad, alleen hebben iPads (en iPhones) nogal vaag gedrag bij het streamen van videos.

Zo ziet het eruit als een Android device een video laadt:
code:
1
x.x.x.x videos.site.com - [16/Jan/2012:14:28:09 +0100] "GET /video.mp4 HTTP/1.1" 200 184729753 "-" "stagefright/1.1 (Linux;Android 3.2)"

Hij krijgt dus gewoon in 1x het volledige bestand voorgeschoteld, tenzij iemand in de video gaat skippen, dan doet Android een nieuwe range request.

Het gedrag van een iPad daarentegen:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
87.194.x.x videos.site.com - [16/Jan/2012:14:29:40 +0100] "GET /video2.mp4 HTTP/1.1" 206 187885 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:29:41 +0100] "GET /video2.mp4 HTTP/1.1" 206 98109 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:29:42 +0100] "GET /video2.mp4 HTTP/1.1" 206 98109 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:29:43 +0100] "GET /video2.mp4 HTTP/1.1" 206 187885 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:29:47 +0100] "GET /video2.mp4 HTTP/1.1" 206 419565 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:29:51 +0100] "GET /video2.mp4 HTTP/1.1" 206 182093 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:29:52 +0100] "GET /video2.mp4 HTTP/1.1" 206 225533 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:29:55 +0100] "GET /video2.mp4 HTTP/1.1" 206 98109 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:29:56 +0100] "GET /video2.mp4 HTTP/1.1" 206 98109 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:29:58 +0100] "GET /video2.mp4 HTTP/1.1" 206 245805 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:30:00 +0100] "GET /video2.mp4 HTTP/1.1" 206 216845 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:30:02 +0100] "GET /video2.mp4 HTTP/1.1" 206 98109 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:30:04 +0100] "GET /video2.mp4 HTTP/1.1" 206 98109 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:30:05 +0100] "GET /video2.mp4 HTTP/1.1" 206 98109 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:30:06 +0100] "GET /video2.mp4 HTTP/1.1" 206 187885 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:30:09 +0100] "GET /video2.mp4 HTTP/1.1" 206 98109 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:30:10 +0100] "GET /video2.mp4 HTTP/1.1" 206 98109 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:30:12 +0100] "GET /video2.mp4 HTTP/1.1" 206 98109 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:30:13 +0100] "GET /video2.mp4 HTTP/1.1" 206 222637 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:30:14 +0100] "GET /video2.mp4 HTTP/1.1" 206 28605 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:30:16 +0100] "GET /video2.mp4 HTTP/1.1" 206 187885 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:30:20 +0100] "GET /video2.mp4 HTTP/1.1" 206 244357 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:30:23 +0100] "GET /video2.mp4 HTTP/1.1" 206 98109 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:30:24 +0100] "GET /video2.mp4 HTTP/1.1" 206 98109 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:30:25 +0100] "GET /video2.mp4 HTTP/1.1" 206 242909 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:30:28 +0100] "GET /video2.mp4 HTTP/1.1" 206 28605 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:30:31 +0100] "GET /video2.mp4 HTTP/1.1" 206 187885 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:30:32 +0100] "GET /video2.mp4 HTTP/1.1" 206 98109 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:30:34 +0100] "GET /video2.mp4 HTTP/1.1" 206 98109 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:30:38 +0100] "GET /video2.mp4 HTTP/1.1" 206 98109 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:30:39 +0100] "GET /video2.mp4 HTTP/1.1" 206 245805 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:30:42 +0100] "GET /video2.mp4 HTTP/1.1" 206 242909 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:30:43 +0100] "GET /video2.mp4 HTTP/1.1" 206 98109 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:30:45 +0100] "GET /video2.mp4 HTTP/1.1" 206 98109 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:30:46 +0100] "GET /video2.mp4 HTTP/1.1" 206 187885 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:30:47 +0100] "GET /video2.mp4 HTTP/1.1" 206 219741 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:30:48 +0100] "GET /video2.mp4 HTTP/1.1" 206 98109 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:30:50 +0100] "GET /video2.mp4 HTTP/1.1" 206 98109 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:30:51 +0100] "GET /video2.mp4 HTTP/1.1" 206 219741 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:30:53 +0100] "GET /video2.mp4 HTTP/1.1" 206 403637 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:31:00 +0100] "GET /video2.mp4 HTTP/1.1" 206 187885 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:31:03 +0100] "GET /video2.mp4 HTTP/1.1" 206 242909 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:31:04 +0100] "GET /video2.mp4 HTTP/1.1" 206 199469 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:31:07 +0100] "GET /video2.mp4 HTTP/1.1" 206 352957 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:31:13 +0100] "GET /video2.mp4 HTTP/1.1" 206 98109 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:31:15 +0100] "GET /video2.mp4 HTTP/1.1" 206 98109 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:31:16 +0100] "GET /video2.mp4 HTTP/1.1" 206 98109 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:31:18 +0100] "GET /video2.mp4 HTTP/1.1" 206 187885 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:31:22 +0100] "GET /video2.mp4 HTTP/1.1" 206 28605 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:31:23 +0100] "GET /video2.mp4 HTTP/1.1" 206 225533 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:31:24 +0100] "GET /video2.mp4 HTTP/1.1" 206 98109 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:31:25 +0100] "GET /video2.mp4 HTTP/1.1" 206 98109 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:31:27 +0100] "GET /video2.mp4 HTTP/1.1" 206 98109 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"
87.194.x.x videos.site.com - [16/Jan/2012:14:31:28 +0100] "GET /video2.mp4 HTTP/1.1" 206 211053 "-" "AppleCoreMedia/1.0.0.9A405 (iPad; U; CPU OS 5_0_1 like Mac OS X; en_us)"

Zoals in de 7e kolom zichtbaar is, zijn dit telkens requests van 30-250 KB.
Als dit allemaal over 1 verbinding zou gaan zou ik dat prima vinden, maar dat gaat het dus niet.
Een iPad met dit gedrag houd al snel zo'n 10 apache childs bezig. 2 of 3 iPads tegelijk zou dus betekenen dat de server gewoon volledig bezig is met het bedienen van die iPads die een 300 MB video in stukjes van een paar honderd KB binnehaalt.
Met het geheugen slurpende gedrag van apache is dit al snel een probleem.

Ik heb een week geleden het serveren van videos van apache naar lighttpd verplaatst (scheelde zo'n 10 apache processen gemiddeld op ieder tijdstip van de dag), maar dat geeft nog steeds hetzelfde probleem van veel open verbindingen voor een simpele tablet.

Omdat het lange filmpjes zijn, was deze ipad dus bezig van 14:09:40 tot 16:13:03 met dit gedrag (1935 requests).
Behalve degene bij Apple die dit bedacht heeft een flinke mep geven, wat zou ik hier server side aan kunnen doen? Behalve iPads blokkeren that is?

Ik heb al een download snelheid limiet van 500kbyte/s, maar dat is per verbinding en daar zou de gebruiker normaal ook geen last van moeten hebben.

Wat info:
Server: VPS
OS: Debian Lenny
Apache: 2.2.21 (met mod_flvx, h264_streaming en mod_bw)
Lighttpd: 1.4.30 (met mod_h264_streaming)

Gtoniser wijzigde deze reactie 21-01-2012 14:40 (201%)


  • Gtoniser
  • Registratie: januari 2008
  • Laatst online: 20:16
*bump*
Iemand een idee?

  • PeeCee
  • Registratie: september 2005
  • Laatst online: 14-12-2013
quote:
Misschien een optie om het aantal verbindingen en sneleheid per IP een quota te stellen.

iPad en video streaming - hoge server load is een mogelijkheid en zo zijn er nog veel meer modules te vinden op http://modules.apache.org.

  • Gtoniser
  • Registratie: januari 2008
  • Laatst online: 20:16
Je eerste link gaat terug naar dit topic.
De videos worden nu trouwens geserveerd vanaf lighttpd, apache is me hier net wat te zwaar voor (ook met een module zoals jij suggereerd)
Pagina: 1