Solved

Why event-based web server softwares use timers?

Posted on 2011-03-13
13
305 Views
Last Modified: 2012-05-11
I can guess that timers in web servers can be used to specify expired connections and close them when they are expired but I can't totally understand why minimum timers  are  important in an event driven (asynchroneous) web server other than that? How timers and events associated in the cycle of the processing of the events which is for example  shown in the image below? Nginx events processing
0
Comment
Question by:BitHunt
  • 5
  • 3
13 Comments
 
LVL 62

Accepted Solution

by:
gheist earned 500 total points
ID: 35127861
http://www.kegel.com/c10k.html

Timers are used because server should not process a client request for too long. Shortest (minimum) timer is about the event which is about to expire first, so we use breath we have for processing now to start processing soon-to-come event and sleep until it.
I would assume that each timer event matches socket request or file handle request.

If you read through article mentioned you see that efficiency of event-based server depends on efficiency of event queue implementation.
0
 

Author Comment

by:BitHunt
ID: 35165208
Thank you for your answer but in the recommended web page it doesn't mention  timers.
I still have questions in my mind like as it is shown in the image why nginx finds minimum timer? what does it mean? what does waiting for the timer mean (does it assign some amount of time to every event in the event loop, if so what happens after processing each event for a specific amount of time and  which events will have minimum timer) ?
0
 
LVL 62

Expert Comment

by:gheist
ID: 35165420
Please re-read my comment and read comments in timers code of nginx.
Link is to give you bigger picture of software architecture.
No more from me unless you credit source of your PNG files.
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

Author Comment

by:BitHunt
ID: 35165896
The PNG is from Nginx Internals by Joshua Zoe it is not a student homework or etc. It is the only architectural document that i found about nginx in English which is shared by everybody  . I'm curious about web servers and want to learn the most efficient one's internals. I'll re-check the source code but there wasn't much information in the source code  that is why I end up asking questions to learn about event based web servers.

PNG from:
 http://www.slideshare.net/joshzhu/nginx-internals
0
 
LVL 62

Expert Comment

by:gheist
ID: 35166422
I thought it was Zeus or IIS...
BTW  how long you learn programming and how long C or C++ ???

PS I ask mods to shuffle topic areas so you get more help on understanding software architecture in general.
PPS if you ever got to OS architecture course you might get the almost obvious idea that minimum timer is one to fire first...
0
 

Author Comment

by:BitHunt
ID: 35179920
It is related to a web server software's architecture and i asked about the some details (analyzing the source code of nginx) ,
0
 
LVL 62

Expert Comment

by:gheist
ID: 35180286
How long is your programming experience?
For education i suppose thttpd or NCSA webserver is a good choice to look at.
0
 
LVL 62

Expert Comment

by:gheist
ID: 35688502
Delete without refund.
1st comment gives as high-level answer as possible given blurry question, rest just figures out that asker does not have ide what She/He exactly wants.
0
 
LVL 53

Expert Comment

by:Dhaest
ID: 35759370
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
groupNoAdj 7 96
DNS @ Naked Domain Record 5 84
SCRIPT65535: Unexpected call to method or property access video html 5 explorer 3 63
iSeries email authority 6 57
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question