Previous | Next --- Slide 12 of 58
Back to Lecture Thumbnails
regi

Let's say all workers are busy with massive requests (e.g. streaming 418 lecture videos), and a new request for index.html comes through. How should the parent process deal with this? Would we want to keep one worker free for smaller requests (and if so, how do you tell how large a request will be)?

ericwang

@regi

I think the web server can understand the request only after one worker process starts servicing. So it would be a problem if we let http requests to wait after streaming requests like you said.

In this case, one option is that the workers in the web server do not service streaming request. They can redirect user's streaming requests to a media streaming server (where most processes are servicing streaming requests).

Or if only one server is available, we can setup 2 worker pools (one free worker maybe not enough). One pool for http requests and the other for streaming requests.

VP7

@regi, ericwang. Multimedia streaming requests are somewhat tricky. Unlike what it appears to be, the video and audio that we see are encoded using a codec, and then stored in a container and there is a Network Abstraction Layer (NAL) that defines how to break down a video/audio/ multimeida sequence into smaller chunks. So a singe request for a video stream can be thought of as a request for "N" NAL units (which itself can be broken down).