Aeraki can help you manage any Layer 7 protocol in a service mesh. Currently, Aeraki already supports open source protocols such as Dubbo, Thrit, and Redis. You can also use Aeraki's MetaProtocol protocol extension framework to manage Layer 7 traffic for private protocols. This series of tutorials will introduce how to use Aeraki to provide seven-layer traffic routing, local flow control, and global flow control for services using protocols such as Dubbo and Thrift in a service mesh, as well as how to quickly develop a custom protocol based on the Aeraki Protocol and manage services using custom protocols in the Istio service mesh. This tutorial describes how to use the MetaRouter CRD resource provided by Areaaki to set local throttling rules for application protocols developed based on MetaProtocol. Installing the Sample ProgramIf you haven't installed the sample application yet, refer to the Quick Start guide to install Aeraki, Istio, and the sample application. After the installation is complete, you can see that the following two NSs are added to the cluster. The two NSs are installed with sample programs for Dubbo and Thrift protocols based on MetaProtocol. You can choose any program for testing.
Aeraki's throttling rules are designed to be intuitive and flexible, supporting both throttling of all incoming requests to a service and fine-grained throttling of requests to a server based on different conditions. Limit all incoming requests to the service
Note: Because local throttling is processed on a service instance, when a service has multiple instances, the actual throttling effect is the throttling number multiplied by the number of instances. Use the aerakictl command to view the client's application logs. You can see that the client can only successfully execute 4 requests per minute (there are two service instances, and each service instance is limited to 2 requests per minute):
Limit incoming requests to services based on conditionsAeraki supports setting multiple throttling rules for services based on conditions to meet fine-grained throttling requirements, such as grouping requests by user or interface and setting different throttling rules for each group. The matching conditions for packet current limiting are the same as those for routing. Any attribute that can be extracted from the request data packet can be used as the matching condition for the current limiting rule. For example, the following rules set different current limiting conditions for the sayHello and ping interfaces:
Set up traffic limiting rules by service and by condition at the same timeYou can set both service-level throttling rules and conditional throttling rules at the same time. This is suitable for situations where you need to set an overall throttling rule for all requests of a service, while also setting exceptions for one or several groups of requests. For example, the following rate limiting rule sets an overall rate limiting rule of 1000 messages per minute for the service, and sets a rate limiting condition of 100 messages per minute for the ping interface.
Understanding the principlesIn the configuration sent by Aeraki to the Sidecar Proxy, the MetaProtocol Proxy is set for the Listener corresponding to the service, and the local rate limit filter is set in the configuration. Aeraki will translate the rate limiting rules configured in MetaRouter into rate limiting configurations of the local rate limit filter and send them to MetaProtocol Proxy through Aeraki. You can view the configuration of the service's sidecar proxy with the following command:
The MetaProtocol Proxy configuration in the Inbound Listener of the Thrift service is as follows:
|
<<: Interviewer: How to close a TCP connection without killing the process?
1. Layering of computer networks In the computer ...
[[409518]] The COVID-19 pandemic has accelerated ...
After the rapid development in 2020, 2021 is a cr...
According to foreign media, Rogers, one of Canada...
What is the role of a host computer gateway? Supp...
As the tech industry talks up 5G networks, Cisco ...
Web-based instant messaging The server can immedi...
Before discussing automotive Ethernet, let’s take...
At present, many Internet companies have joined h...
Canadian hosting provider VMISS currently offers ...
The recent maturation of technologies such as hig...
Just like cellular standards, Wi-Fi standards are...
Justhost opened a new German data center this mon...
When you enter a web address or uniform resource ...
IDC report shows that in the first half of 2024, ...