Skip to content
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

CI: Add sozu benchmark #1042

Closed
wants to merge 12 commits into from
Closed

Conversation

GuillaumeASSIER
Copy link
Contributor

@GuillaumeASSIER GuillaumeASSIER commented Nov 30, 2023

Hi,

As sozu need strong performances, we need a simple way to benchmark sozu regularly.

I create a complete sozu benchmark script using python who's in charge of booting a sozu with lagging_server, load certificates with a complete configuration and run a stressing tool. At the end, we collect all the results in a log file archive as an artifact.

It's automated with a CI called benchmark.yml to automate the build and the benchmarking tool. For now, I use bombardier, but we can easily add new testing tools.

This setup test sozu performances with following settings :

  • 1 Minute duration
  • 400 connections at max
  • HTTP1 (HTTP2 can be support if needed)
  • HTTP Plain text
  • HTTPS with the following encryption settings
    • RSA 2048
    • RSA 4096
    • ECDSA

The aim is not to get some reliable results, but to get a simple methodology that we can reuse in the future to track sozu performances.

@CLAassistant
Copy link

CLAassistant commented Nov 30, 2023

CLA assistant check
All committers have signed the CLA.

@Keksoj
Copy link
Contributor

Keksoj commented Dec 4, 2023

please squash the commits and add a description to this PR to give context, list objectives, show some output examples.

@GuillaumeASSIER GuillaumeASSIER force-pushed the ci branch 2 times, most recently from e72caf6 to c40d21a Compare January 2, 2024 10:26
@Keksoj
Copy link
Contributor

Keksoj commented Feb 6, 2024

I like it very much. Can you please remove the "draft" mention to the pull request?

Also, it would be great to have the output of the benchmark be displayed somewhere. The dream would be to have the same as the rustls repository, where a dedicated benchmarking bot is present and creates nice tables of results at will.
At the very least, it would be cool to display the results in the output of the benchmark job.

@GuillaumeASSIER GuillaumeASSIER marked this pull request as ready for review February 6, 2024 16:23
Copy link
Contributor

@Keksoj Keksoj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks awesome to me. Please squash everything :-)

Keksoj and others added 11 commits February 7, 2024 11:04
this solves an error where payload was partially transmitted

Co-Authored-By: Eloi DEMOLIS <[email protected]>
Co-Authored-By: Eloi DEMOLIS <[email protected]>
create Channel::set_timeout()

Co-Authored-By: Eloi DEMOLIS <[email protected]>
Due to how access logs are parsed inside CleverCloud, we can't have
spaces in tags nor can a tag value end with a comma. This commit
sanitizes the user-agent which is the only tag with client data. This is
a temporary fix necessary until we make the logs binary.

Signed-off-by: Eloi DEMOLIS <[email protected]>
Signed-off-by: Florentin Dubois <[email protected]>
Signed-off-by: Florentin Dubois <[email protected]>
Signed-off-by: Florentin Dubois <[email protected]>
The multi-threaded, event-based architecture was too complicated and
prevented introducing protobuf channels.
The new CommandServer functions on the same principle as the proxy
logic of Sōzu: listen to events with Mio in an event loop, dispatch
the events accordingly by creating WorkerSessions, ClientSessions.
This new CommandServer allows to create Tasks, that can scatter
requests to all workers, gather their responses as the event loop goes,
and invoke the task finish() when all responses are gathered.

A worker whose unix socket is disconnected will be killed,
and automatically restarted if configurated to. Conversely, if the
main process dies, the orphaned workers will perform a hard stop.

Sōzu channels used everywhere for communication with workers and
clients.

Automatic counting and respawning of workers, at each tick

implement soft stop and hard stop

improve CLI:
- disable logging in CLI when displaying JSON
- sort list of workers when displaying status

error handling with thiserror

remove obsolete documentation on managing workers
remove unused dependencies: smol, futures, futures-lite, anyhow

Co-Authored-By: Emmanuel BOSQUET <[email protected]>
Signed-off-by: Eloi DEMOLIS <[email protected]>
Co-Authored-By: Mbechezi Mlanawo <[email protected]>
@GuillaumeASSIER
Copy link
Contributor Author

I failed to fix the git history. I made a new clean PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants