-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Basic concurrency support for transaction prover service #908
Comments
Looks great! A couple of additional comments:
And the last point is that ideally we'd not implement it ourselves but would be able to use an already existing component/framework. |
Hello! I've been researching a bit on this issue, in particular using Cloudflare's Pingora crates. I think that it fits as a solution for all our problems here.
This can be tackled with Pingora's LoadBalancer and setting the config to 1 thread per service. I can elaborate a PoC of this with a simple "hello world" server shortly. Related to this is also the creation and destruction of workers. At least in my first approach I was thinking of manually running instances of the server and adding the endpoints to the upstream configuration of the load balancer; this will also work for destructing workers (remove the server from the list of upstreams, reload, turn of the prover server). This can be benefited from the Graceful Upgrade that Pingora supports.
For this we can use the rate limiting that the crate has out of the box, just setting the max amount of request per user per second as described here.
We can also use the Pingora's timeout out of the box for this, which is easily configurable.
It also has a builtin Prometheus server that can be used for that purpose. If you think that it is ok, I can proceed the following way:
All of these can be done in different issues and if you agree I can start immediately. |
This sounds great! Let's start with the PoC to see if we hit any roadblocks. In terms of the setup, I was thinking to load balancer could run on a relatively small machine (e.g., 4 cores or something like that), and the provers would run on big machines (e.g., 64 cores). Is that how you are thinking about it too? |
The current version of the transaction proving service processes exclusively one transaction at a time. To improve performance and scalability, we want to introduce concurrency while ensuring the system remains resilient against potential DDOS attacks and resource exhaustion.
Basic desired features:
The text was updated successfully, but these errors were encountered: