Web Servers
Web Servers
Mendel Rosenblum
HTTP
LAN
Internet
int fd = open("index.html");
int len = read(fd, fileContents, sizeOfFile(fd));
write(tcpConnection, httpResponseHeader, headerSize);
write(tcpConnection, fileContents, len);
● Note open and read may have to talk to a slow disk device
○ Can process requests concurrently by starting a new thread or a new process per request
runProgramInNewProcess(tcpConnection);