Repository navigation
Transmit config to new worker with a protobuf type + protobuf channels - #1000
Merged
Merged
Conversation
Keksoj
force-pushed
the
transmit-protobuf-only
branch
from
October 11, 2023 13:27
542a679 to
64920c5
Compare
Author
|
We merged #1001, a unique commit, into this branch, here is the abstract of this PR: This is the last step in the implementation of protobuf in Sōzu: use protobuf for all communications of Sōzu, within and without. See #1000 Coded with @Wonshtrum , this PR:
Here is a simple benchmark of performance improvements: |
Keksoj
force-pushed
the
transmit-protobuf-only
branch
from
October 23, 2023 18:03
2e8a15e to
33d8150
Compare
Keksoj
force-pushed
the
transmit-protobuf-only
branch
from
November 23, 2023 15:44
29f6af0 to
a17a585
Compare
Keksoj
force-pushed
the
transmit-protobuf-only
branch
from
November 24, 2023 13:14
a17a585 to
323171d
Compare
Keksoj
force-pushed
the
transmit-protobuf-only
branch
4 times, most recently
from
November 30, 2023 17:21
ee289e6 to
b87ada8
Compare
Keksoj
force-pushed
the
transmit-protobuf-only
branch
6 times, most recently
from
December 8, 2023 17:02
190f5b4 to
58314d0
Compare
Keksoj
force-pushed
the
transmit-protobuf-only
branch
from
January 2, 2024 10:02
49764d2 to
b063ac4
Compare
4 tasks done
Keksoj
force-pushed
the
transmit-protobuf-only
branch
2 times, most recently
from
January 24, 2024 14:02
c6005ec to
81dc275
Compare
Keksoj
force-pushed
the
transmit-protobuf-only
branch
from
January 30, 2024 21:14
81dc275 to
47ebb9f
Compare
FlorentinDUBOIS
requested changes
Jan 31, 2024
Keksoj
force-pushed
the
transmit-protobuf-only
branch
9 times, most recently
from
February 1, 2024 12:41
9bd9a79 to
17f3ba8
Compare
FlorentinDUBOIS
requested changes
Feb 1, 2024
Keksoj
force-pushed
the
transmit-protobuf-only
branch
2 times, most recently
from
February 2, 2024 14:00
6a72c6f to
bb876ee
Compare
previously, a whole Config was passed to the new worker, which is overkill, and will not be translatable to protobuf. ServerConfig contains only the necessary infos.
since buffer size config will be transmitted in protobuf using the uint64 type.
Co-Authored-By: Eloi DEMOLIS <[email protected]>
Keksoj
force-pushed
the
transmit-protobuf-only
branch
from
February 2, 2024 15:51
bb876ee to
cc0a221
Compare
FlorentinDUBOIS
approved these changes
Feb 9, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a new worker is created, the whole
Configobject is passed to it:sozu/bin/src/worker.rs
Lines 340 to 342 in bc49d7f
This
Configobject contains necessary infos, like timeouts, but also proxy business infos like clusters, frontends etc. that are not used directly and are re-sent to the new worker later on in a different form.Since we strive to have a protobuf-only communication both without and within Sōzu,
and since the
Configobject can be translated to protobuf only with difficulty, and no real purpose (as most of it is unused),this PR changes the passing of the
Configobject to aServerConfig. This struct was already derived fromConfig, was present in the Sōzu lib, but now:This PR paves the way to changing the Sōzu channels in order to stop serializing structs to JSON, but to make use of the protobuf binary serialization.
One thing remains in a JSON form, though: requests written to a state file and passed to sōzu using a
LoadStatemessage.