- RESTful Web API Design with Node.js 10
- Valentin Bojinov
- 242字
- 2021-08-27 18:37:25
Scalability and performance
So far, we stressed the importance of having stateless behavior for a RESTful web application. The World Wide Web (WWW) is an enormous universe, containing huge amount of data and a lot of users, eager to get that data. The evolution of the WWW has brought the requirement that applications should scale easily as their load increases. Scaling applications that have a state is difficult to achieve, especially when zero or close-to-zero operational downtime is expected.
That's why staying stateless is crucial for any application that needs to scale. In the best-case scenario, scaling your application would require you to put another piece of hardware for a load balancer, or bring another instance in your cloud environment. There would be no need for the different nodes to sync between each other, as they should not care about the state at all. Scalability is all about serving all your clients in an acceptable amount of time. Its main idea is to keep your application running and to prevent Denial of Service (DoS) caused by a huge amount of incoming requests.
Scalability should not be confused with the performance of an application. Performance is measured by the time needed for a single request to be processed, not by the total number of requests that the application can handle. The asynchronous non-blocking architecture and event-driven design of Node.js make it a logical choice for implementing an application that scales and performs well.
- Google Apps Script for Beginners
- R語言經典實例(原書第2版)
- oreilly精品圖書:軟件開發者路線圖叢書(共8冊)
- Learning Linux Binary Analysis
- Python數據分析(第2版)
- Python高效開發實戰:Django、Tornado、Flask、Twisted(第2版)
- Getting Started with Hazelcast(Second Edition)
- Visual FoxPro程序設計習題集及實驗指導(第四版)
- Xcode 6 Essentials
- Java編程從入門到精通
- Mockito Essentials
- Java程序設計教程
- 奔跑吧 Linux內核
- Java語言程序設計實用教程(第2版)
- R語言數據分析從入門到實戰