3 ms·
Would it be possible for a PID controller to scale some sort of bottleneck mechanism? E.g. you have an application that could get spammed with 10,000 requests.
by Philip-J-Fry 4y ago
Would it be possible for a PID controller to scale some sort of bottleneck mechanism?
E.g. you have an application that could get spammed with 10,000 requests. The application server is fine, but the database can suffer performance issues.
So you have some sort of feedback loop monitoring the response time of the database and deciding how many requests you let through.
I thought about this because it's useful for something I was working on. But I have never used PID controllers and it looked like it's the sort of thing they could be used for. Never went further with it though.
- gpderetta 4y agoWouldn't simple backpressure solve this?
- Philip-J-Fry 4y agoI imagine there's already a solution but I couldn't really find any simple algorithms. Have you got a link to any?
- icegreentea2 4y agoIn general, controllers shine when you have complex relationships between the value that you directly control and the measure that you can about. In particular, "complex" meaning "well modeled with differential equations". In your scenario, since the rate of database requests is probably a very simple function of number (ie, well modelled by a simple constant multiple) of application requests, you probably don't need a "full controller" to implement the throttling.
- deleted 4y ago[deleted]
- gillh 4y agoThis is exactly what the Aperture project is solving: https://github.com/fluxninja/aperture https://github.com/fluxninja/aperture