- 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.
- ASP.NET Core:Cloud-ready,Enterprise Web Application Development
- C++程序設計教程
- Java系統(tǒng)分析與架構設計
- PyTorch自動駕駛視覺感知算法實戰(zhàn)
- Leap Motion Development Essentials
- 樂高機器人設計技巧:EV3結構設計與編程指導
- Learning Informatica PowerCenter 10.x(Second Edition)
- Python數(shù)據(jù)可視化之Matplotlib與Pyecharts實戰(zhàn)
- Python機器學習基礎教程
- PHP+Ajax+jQuery網站開發(fā)項目式教程
- Python語言實用教程
- 21天學通C++(第5版)
- Android移動開發(fā)案例教程:基于Android Studio開發(fā)環(huán)境
- Magento 2 Beginners Guide
- C語言程序設計實踐