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?
background Under the microservice software archit...
[[355627]] Preface In recent years, major compani...
[[263696]] The 5G era is an era of great integrat...
Less than four years after the issuance of 4G lic...
On October 20, at the 6th World Internet Conferen...
5G enables real-time data at the point of origin,...
A few years ago, LET often carried out voting act...
I searched and found that the last information ab...
Ding Ling, a modern Chinese feminist writer, publ...
CloudCone launched the SSD VPS Flash Sale yesterd...
[[323303]] GlobalConnect | Versa Networks GlobalC...
Power over Ethernet (PoE) is a technology that tr...
[51CTO.com original article] On September 25, 202...
Packet Optical Transport Network (POTN) is a rapi...
When people are walking on a broad road, the road...