-
Notifications
You must be signed in to change notification settings - Fork 103
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
feat: add core secondary api and forwarding middleware #6685
Conversation
00b2418
to
d6cc818
Compare
I don't understand the relationship between secondary core deployment and memory leak. |
@@ -0,0 +1,69 @@ | |||
apiVersion: apps/v1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can (but should we ?) we inherit from core-deployment.yaml
and override the variables we need ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wish but sadly I don't think you can do that (need specialized tools that we don't use to "build" yaml -- for now we're just duplicating when needed)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not know rust or k8 enough to do a deep verification but it looks good to me 👍🏼
So we've had a memory leak on In order to confirm this, I am creating a duplicate "core" service (the "secondary") running that same |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Thanks @fontanierh very clear and makes a lot of sense. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
|
||
let client = Client::new(); | ||
let (parts, body) = req.into_parts(); | ||
let body_bytes: Bytes = match axum::body::to_bytes(body, usize::MAX).await { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I presume that given we never deal with files, this simple redirection should cover our needs , right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah not sure if it'd work with files, but not super important since we don't use them with this endpoint
* feat: add core secondary api and forwarding middleware * proper error handling * nit --------- Co-authored-by: Henry Fontanier <henry@dust.tt>
* feat: add core secondary api and forwarding middleware * proper error handling * nit --------- Co-authored-by: Henry Fontanier <henry@dust.tt>
Description
We want to experiment forwarding tables query related endpoints to a secondary
core
deployment as we suspect this is where the memory leak is coming from.This PR adds a new k8s deployment wrapped in a new service (
core-secondary-[service,deployment]
). This new deployment is running the exact same code ascore
. Network policy has been updated such that onlycore
can send requests tocore-secondary
.core-secondary
has the same egress rights to other Dust services ascore
.Also adds an axum middleware to forward tables query requests to secondary (disabled for now)
Risk
N/A (not enabled yet)
Deploy Plan
apply infra then deploy
core