Repository navigation
Refactor http state - #871
Merged
Merged
Conversation
Keksoj
requested review from
BlackYoup,
FlorentinDUBOIS and
Wonshtrum
as code owners
January 10, 2023 14:00
Wonshtrum
force-pushed
the
refactor_http_state
branch
3 times, most recently
from
January 10, 2023 15:22
4419f2d to
195813e
Compare
Keksoj
force-pushed
the
refactor_http_state
branch
from
January 12, 2023 14:03
5f59d3e to
84617e5
Compare
Wonshtrum
force-pushed
the
refactor_http_state
branch
from
January 13, 2023 15:06
84617e5 to
7dbccbf
Compare
Keksoj
force-pushed
the
refactor_http_state
branch
from
January 17, 2023 15:14
a2c6ae4 to
b4fd3e4
Compare
Keksoj
force-pushed
the
refactor_http_state
branch
3 times, most recently
from
January 30, 2023 11:51
82dd79a to
fab483b
Compare
Wonshtrum
force-pushed
the
refactor_http_state
branch
from
February 1, 2023 11:18
d72b2f4 to
ba83d10
Compare
Keksoj
force-pushed
the
refactor_http_state
branch
from
February 1, 2023 15:06
a562368 to
e9b936f
Compare
Wonshtrum
force-pushed
the
refactor_http_state
branch
from
February 3, 2023 14:16
acd0c1c to
44c661b
Compare
Keksoj
force-pushed
the
refactor_http_state
branch
from
February 3, 2023 16:19
44c661b to
eaebfe4
Compare
Keksoj
force-pushed
the
refactor_http_state
branch
from
February 13, 2023 09:14
eaebfe4 to
b0c2745
Compare
In order to fit HTTP2 modifications later: Mux sessions, generic HTTP Traits: trait L7ListenerHandler (impl by listeners) proxy trait L7Proxy (impl by proxies) state trait SessionState (impl by Http, Pipe, Expect) state machines of HTTP, HTTPS and TCP sessions: handle backend connection, passthrough, closing integrate https logic into new http state Replace State::Invalid by State::FailedUpgrade(marker) add the Invalid variant to Http state, extract it from the Option StateMachineBuilder macro to merge all State related boilerplate default behavior for SessionState::shutting_down() pass container_frontend_timeout to the State instead of the Session Session: clean closing of all sessions (add has_been_closed field) rewrite all session upgrades remove unused SessionResult::ReconnectBackend, remove HttpSession::back_token() and HttpsSession::back_token() make ProxySession::print_session() call SessionState::print_state() remove listener token and request timeout from HTTP and HTTPS Session Narrowing scopes: StateResult > SessionResult > SessionIsToBeClosed replace ProxySession::tokens() with ProxySession::frontend_token() Server rewrite: only the server calls ProxySession::close() generic session shutdown for the zombie_check and shutdown() change ProxySession::tokens() to frontend_tokens(), fix the zombie checker shut_down_sessions_by_frontend_tokens() the zombie checker has to be repaired to use only the frontend token end-to-end tests: test_http_behaviors replaces /lib/tests/http.rs test_tls_endpoint remove try_issue_810_panic_variant, no longer relevant Init logger with loglevel error is RUST_LOG is not found Use localhost instead of lolcatho.st for e2e test in pipeline renaming: config::HttpListener -> HttpListenerconfig (same for TCP and HTTPS) Session/Listener/Proxy -> add Tcp/Http/Https prefixes process_events -> update_readiness ProxySession::print_state -> ProxySession::print_session Fixed gauges: all "protocol.*" gauges are modified by the Sessions only "*.active_requests" are explicit Code cleanliness: sort alphabetically the field structs and function arguments relevant to this commit Replace if lets with exhaustive pattern matching documenting comments in relevant places Co-authored-by: Emmanuel Bosquet <[email protected]>
Keksoj
force-pushed
the
refactor_http_state
branch
from
February 13, 2023 09:56
b0c2745 to
476e230
Compare
FlorentinDUBOIS
approved these changes
Feb 13, 2023
FlorentinDUBOIS
left a comment
Collaborator
There was a problem hiding this comment.
That seems good to me :)
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.
In order to support HTTP2 in Sōzu, there is a number of steps to take. This is one of them.
This PR aims to normalize the
States of the various protocols (Expect,Pipe...), and to make them handle backend connection.A side effect of this refactoring is to merge duplicate code of the
httpandhttpsproxies into theHttpstate.