-
Notifications
You must be signed in to change notification settings - Fork 498
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
Implementation details of redirect-to-olympus #474
Comments
My Idea was to have it fast and synchronous - the redirect
This way we dont bloat the code with spinning and checking... but treat it in a more clear way. |
To layer it up, we will have: job scheduling middleware:
redirect middleware
handler
|
Should the worker fetch the module from Olympus or from the VCS? The later could be slower (assuming Olympus has it stored in the DB) but we already have this functionality implemented so maybe it's enough for MVP? |
worker will do olympus pull only. because we will redirect to olympus. Edit: check these charts: https://docs.gomods.io/design/communication/ |
We are redirecting cmd/go to Olympus. |
Yes, we might, but it would be slower, this would require a synchronous call to Olympus which would synchronously pull module from VCS, then it would serve the module to the proxy. The proxy would need to store it as well and then serve to the client. This might timeout for larger packages. I see async as a safer variant of those 2. |
After proxy redirects go cmd to Olympus, its worker should pull from Olympus as well. |
Also relevant: #416 |
We had a similar discussion about the proxy returning to the CLI indicating that it should do a VCS fetch while the proxy did a fetch in the background. We decided then to keep it simple and do a What do folks think about doing the same strategy of having the proxy download from olympus before returning to the client? |
One thing I like on a sync solution is that Olympus server may be unreachable from your client (firewall or whatever) but proxy might be able to reach to Olympus (think of any weird rule and you will find at least one company implementing it). Then having this in sync would be safer, causing less frustration and that's what we want, happy users. But we need to think about scalability. Having it async gives us the advantage of handling the load in a preconfigured manner. We don't get out of memory because we know we will handle 5 pulls at the time (example). With pull per request, it will be more challenging to scale it (and it will be fun), but we need to think about distributed locks (mentioned in a diff thread, zookeeper/consul something similar). I think with sync this will become a must. If perf turns out not satisfying we need to consider async fill with a redirect. |
What we talked at the meeting: 1 proxy instance : Multiple DBsNot for MVP Multiple replicas of Proxy, sharing DBFor MVP we focus on 1:1, Deduplication and SyncMVP: 1 replica, in memory synchronization/locks |
As of #772, we're not going to try and build a registry for the time being, so I'm closing this issue |
This is a follow-up of #456 (comment)
We've decided that we're going to make the proxy redirect to an upstream without caching in our first release. This issue is for discussion on what we should do in a follow-up to that release (I have labeled this as a
v2
milestone)There are two related questions:
The text was updated successfully, but these errors were encountered: