The event-driven model that Node.js uses provides scalability and performance. In this chapter, you have learned the difference between the event-driven model and the traditional threaded model for webservers. You’ve also learned that you can add events to the event queue when blocking I/O is called, and you can use events, timers, or the nextTick()
method to schedule events.
You’ve seen that there are three types of timer events: timeout, interval, and immediate. You can use each of these events to delay the execution of work for a period of time. You’ve also seen how to implement your own custom event emitters and add listener functions to them.