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

Initial library #6

Merged
merged 19 commits into from
Mar 8, 2024
Merged

Initial library #6

merged 19 commits into from
Mar 8, 2024

Commits on Feb 27, 2024

  1. Configuration menu
    Copy the full SHA
    1395734 View commit details
    Browse the repository at this point in the history
  2. Initial implementation of a TCP proxy supporting basic configuration …

    …and a least-connection load balancer.
    
    Yet to be implemented: mTLS authn/z and RateLimiting
    joshbranham committed Feb 27, 2024
    Configuration menu
    Copy the full SHA
    20b4c1f View commit details
    Browse the repository at this point in the history
  3. Fix GH action workflow

    joshbranham committed Feb 27, 2024
    Configuration menu
    Copy the full SHA
    43b7f12 View commit details
    Browse the repository at this point in the history
  4. Misc cleanup

    joshbranham committed Feb 27, 2024
    Configuration menu
    Copy the full SHA
    0fefcbb View commit details
    Browse the repository at this point in the history

Commits on Feb 28, 2024

  1. @tigrato feedback part 1

    - Comments and consolidation of Config
    - Simplify connection handling in proxy with less channels + goroutines
    joshbranham committed Feb 28, 2024
    Configuration menu
    Copy the full SHA
    b6a8d27 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b0bf3c3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    fb9881d View commit details
    Browse the repository at this point in the history

Commits on Feb 29, 2024

  1. Address feedback related to LoadBalancer implementation

    Josh Branham committed Feb 29, 2024
    Configuration menu
    Copy the full SHA
    ea6a0d5 View commit details
    Browse the repository at this point in the history
  2. Rework how IdleTimeout is configured via SetDeadline. Tested this by …

    …setting a sleep in the echo server,
    
    and confirmed the tests failed, logging the i/o timeout. It is possible this doesn't work exactly how I think,
    in that long-lived connections that don't send some type of heartbeat might expire. Will test that once I have
    the server component.
    
    ```
    ❯ make test
    go test ./...
    2024/02/28 21:27:59 INFO proxy ready listening=127.0.0.1:61459 targets=127.0.0.1:61458
    2024/02/28 21:28:01 ERROR idle timeout exceeded error="readfrom tcp 127.0.0.1:61459->127.0.0.1:61460: read tcp 127.0.0.1:61461->127.0.0.1:61458: i/o timeout"
    2024/02/28 21:28:01 ERROR copying data error="readfrom tcp 127.0.0.1:61459->127.0.0.1:61460: read tcp 127.0.0.1:61461->127.0.0.1:61458: i/o timeout"
    2024/02/28 21:28:01 ERROR idle timeout exceeded error="readfrom tcp 127.0.0.1:61461->127.0.0.1:61458: read tcp 127.0.0.1:61459->127.0.0.1:61460: i/o timeout"
    2024/02/28 21:28:01 ERROR copying data error="readfrom tcp 127.0.0.1:61461->127.0.0.1:61458: read tcp 127.0.0.1:61459->127.0.0.1:61460: i/o timeout"
    ```
    Josh Branham committed Feb 29, 2024
    Configuration menu
    Copy the full SHA
    c13ca4f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5f312ac View commit details
    Browse the repository at this point in the history
  4. Add some missing public function godoc

    Josh Branham committed Feb 29, 2024
    Configuration menu
    Copy the full SHA
    95a48db View commit details
    Browse the repository at this point in the history
  5. Address feedback to ensure you can't double close/serve. Added safety…

    … on connection closing to prevent
    
    a goroutine from getting stuck. Simplify the public API.
    Josh Branham committed Feb 29, 2024
    Configuration menu
    Copy the full SHA
    f973894 View commit details
    Browse the repository at this point in the history

Commits on Mar 1, 2024

  1. Simplify locking behavior of Serving with atomic.Bool

    Josh Branham committed Mar 1, 2024
    Configuration menu
    Copy the full SHA
    a9cbf9d View commit details
    Browse the repository at this point in the history
  2. Close client connection when upstream is down

    Josh Branham committed Mar 1, 2024
    Configuration menu
    Copy the full SHA
    1e82174 View commit details
    Browse the repository at this point in the history
  3. Fix issue with hung connections

    Josh Branham committed Mar 1, 2024
    Configuration menu
    Copy the full SHA
    07b0fa1 View commit details
    Browse the repository at this point in the history

Commits on Mar 8, 2024

  1. Implement a Token Bucket rate limiter (#4)

    * Implement a Token Bucket rate limiter
    
    * Misc cleanup, comments
    
    * RateLimitManager gracefully handles individual RateLimiters being closed already.
    joshbranham authored Mar 8, 2024
    Configuration menu
    Copy the full SHA
    f1d7cc6 View commit details
    Browse the repository at this point in the history
  2. Add a Server CLI (#5)

    joshbranham authored Mar 8, 2024
    Configuration menu
    Copy the full SHA
    3fef6c3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    65197e0 View commit details
    Browse the repository at this point in the history
  4. Small fixes

    joshbranham committed Mar 8, 2024
    Configuration menu
    Copy the full SHA
    a5c7a4a View commit details
    Browse the repository at this point in the history