- Building Serverless Web Applications
- Diego Zanon
- 378字
- 2021-07-15 17:31:21
Availability
A highly available solution is the one that is fault tolerant to hardware failures. If one machine goes out, you must keep running the application with a satisfactory performance. If you lose an entire data center due to a power outage, you must have machines in another data center to keep the service online. Having high availability generally means to duplicate your entire infrastructure, placing each half in a different data center.
Highly available solutions are usually very expensive in IaaS and On-Premises. If you have multiple machines to handle your workload, placing them in different physical places and running a load balancing service can be enough. If one data center goes out, you keep the traffic in the remaining machines and scale to compensate. However, there are cases where you will pay extra without using those machines.
For example, if you have a huge relational database that is scaled vertically, you will end up paying for another expensive machine as a slave just to keep the availability. Even for NoSQL databases, if you set a MongoDB replica set in a consistent model, you will pay for instances that will act only as secondaries, without serving to alleviate read requests.
Instead of running idle machines, you can set them in a cold start state, meaning that the machine is prepared, but is off to reduce costs. However, if you run a website that sells products or services, you can lose customers even in small downtimes. A cold start for web servers can take a few minutes to recover, but needs several more minutes for databases.
Considering these scenarios, in serverless, you get high availability for free. The cost is already considered in what you pay to use.
Another aspect of availability is how to handle Distributed Denial of Service (DDoS) attacks. When you receive a huge load of requests in a very short time, how do you handle it? There are some tools and techniques that help mitigate the problem, for example, blacklisting IPs that go over a specific request rate, but before those tools start to work, you need to scale the solution, and it needs to scale really fast to prevent the availability from being compromised. In this, again, serverless has the best scaling speed.
- OpenStack Cloud Computing Cookbook(Third Edition)
- Java語言程序設計
- jQuery Mobile Web Development Essentials(Third Edition)
- Docker技術入門與實戰(第3版)
- Git高手之路
- SQL Server 2016數據庫應用與開發習題解答與上機指導
- Java應用開發技術實例教程
- HDInsight Essentials(Second Edition)
- UML 基礎與 Rose 建模案例(第3版)
- Nginx Lua開發實戰
- Access 2010數據庫應用技術(第2版)
- OpenCV 4計算機視覺項目實戰(原書第2版)
- App Inventor創意趣味編程進階
- 編程改變生活:用Python提升你的能力(進階篇·微課視頻版)
- Lift Application Development Cookbook