- Microservice Patterns and Best Practices
- Vinicius Feitosa Pacheco
- 221字
- 2021-06-30 19:02:50
Throttling for your client
Microservices that are well designed are highly scalable, but it does mean having infinite resources. With cloud-computer-limited resources, it is very relative, but the cost to provide a service can become so high that it prevents the same.
Thinking about it, some steps can be taken to reduce the cost of consumption. One, as mentioned earlier, is the implementation of an efficient cache. However, that's not all; at times, throttling is necessary to block the high consumption of resources.
It is not feasible that a client of a microservice as a web page runs a very high number of requests for the microservice, or that the same page is not mature enough to handle data already received.
For this, simple throttling that keeps the reference of who consumes the information and the data transferred to the client is very effective for reducing the consumption of microservices.
Some throttling policies can be applied:
- Number of requests per minute from the same client
- Number of requests per second from the same client
- Number of requests per minute from the same client for similar information
- Number of requests per second for the same client for the same information
With these, it is possible to limit such potential blunders as inadequate data manipulation, irresponsible Ajax requests, and less sophisticated attack attempts.
- FreeSWITCH 1.2
- 重新定義Spring Cloud實(shí)戰(zhàn)
- 物聯(lián)網(wǎng)+BIM:構(gòu)建數(shù)字孿生的未來(lái)
- Proxmox High Availability
- Building RESTful Web Services with Spring 5(Second Edition)
- 2小時(shí)讀懂物聯(lián)網(wǎng)
- 端到端QoS網(wǎng)絡(luò)設(shè)計(jì)
- LwIP應(yīng)用開(kāi)發(fā)實(shí)戰(zhàn)指南:基于STM32
- Guide to NoSQL with Azure Cosmos DB
- 信息技術(shù)安全評(píng)估準(zhǔn)則:源流、方法與實(shí)踐
- 5G智慧交通
- React Design Patterns and Best Practices(Second Edition)
- Building Microservices with Spring
- 物聯(lián)網(wǎng)導(dǎo)論
- 網(wǎng)絡(luò)空間作戰(zhàn):機(jī)理與籌劃