WebServerArchitecture

WebServerArchitecture - Web Server Architecture Web Server...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
Web Server Architecture
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Web Server Architecture Complex Helpful to consider best design practices Items to consider Response Time Use concurrency Features HTTP/1.1 CGI
Background image of page 2
Web Server Architecture Client Web Server CGI program stdin stdout h t p use dup2 to redirect stdin and stdout back to the web server use dup2 to redirect stdin and stdout back to the web server
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Web Server Architecture Client Main Thread for(j=0;j<nthread; pthread_create() while(1) newsock = accept() enQ(newsock) C o n e c t ( ) Thread Pool while(1) sock = deQ() recv() process send() close(sock) while(1) sock = deQ() recv() process send() close(sock) while(1) sock = deQ() recv() process send() close(sock) while(1) sock = deQ() recv() process send() close(sock) while(1) sock = deQ() recv() process send() close(sock) while(1) sock = deQ() recv() process send() close(sock) while(1) sock = deQ() read() process write() close(sock) Connection Queue
Background image of page 4
Web Server Architecture Minimize Overhead
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 9

WebServerArchitecture - Web Server Architecture Web Server...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online