-
Notifications
You must be signed in to change notification settings - Fork 753
Description
Feature Request
Sometimes, we may encounter a high rate of GetRegion requests, which could significantly affect PD's performance. It can also affect PD availability due to leader election. Therefore, we have introduced the Active Follower and QueryRegion streaming interface in the latest master to alleviate the PD's pressure. But this way is not scalable, and PD is still a single point for routing.
We have to pay for the peak traffic by deploying the high-performance machine, even if the traffic may only last for a few hours, and most of the time, the traffic is low.
To improve this kind of case, we can introduce the router service, which is a stateless service and supports auto scaling.
In normal time, we can use PD, which has less CPU and memory, to handle the GetRegion requests. Once the traffic increases, the router service is scaled out to handle these requests according to specific metrics such as CPU or memory. PD only needs to focus on the other requests. We can also scale in the router service to 0 when the traffic is low.