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

Add ability to load triemux from Content Store #490

Merged
merged 17 commits into from
Dec 4, 2024

Commits on Nov 25, 2024

  1. Add CsRoute type

    This struct and type contains the logic for routes contained previously
    in the Router API and be used to help choose which handler to use.
    theseanything committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    408cfdb View commit details
    Browse the repository at this point in the history
  2. Add pgx dependencies

    Used for interacting with content store's postgres db.
    theseanything committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    51d0063 View commit details
    Browse the repository at this point in the history
  3. Add function to load routes from content store

    This implements the logic to query the content store and populate the
    triemux.
    theseanything committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    8fa4bff View commit details
    Browse the repository at this point in the history
  4. Add postgres connection pool to Router

    This makes a connection pool to the database url specified with he env
    var CONTENT_STORE_DATABASE_URL.
    theseanything committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    3aa3dce View commit details
    Browse the repository at this point in the history
  5. Add CSMUX_SAMPLE_RATE to canary content store routing

    This provides a simple feature flag to turn off routing using content
    store and allows us to canary a percentage of requests to use the
    content store mux. A value of 0.0 will switch off the feature entirely
    and prevent the Router from trying to create a connection pool.
    theseanything committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    7dc4fd6 View commit details
    Browse the repository at this point in the history
  6. Add mux for routes loaded from content store

    This uses that the CsMuxSampleRate to controller the percentage of
    requests served by the mux built using the content store data.
    theseanything committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    28d369d View commit details
    Browse the repository at this point in the history
  7. Add ability to reload routes content store

    This adds a helper function to update csmux with a new version
    containing updated routes.
    theseanything committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    aa8d3fc View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    d29d0a1 View commit details
    Browse the repository at this point in the history
  9. Use constants for handler types

    This fixes a golint error.
    theseanything committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    d410d47 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    4d54e7a View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    da72317 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    b7fc3c6 View commit details
    Browse the repository at this point in the history
  13. Auto reload route from CS every minute

    This is a fail safe in-case the listen/notify mechanism.
    theseanything committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    0c38590 View commit details
    Browse the repository at this point in the history

Commits on Dec 2, 2024

  1. Use non-blocking send for route reloading

    This ensures we don't reload more than we need to. If a notification
    already exists to reload, then we don't need to send another
    notification, as all updates will be captured in the next reload.
    theseanything committed Dec 2, 2024
    Configuration menu
    Copy the full SHA
    1dc32f0 View commit details
    Browse the repository at this point in the history
  2. Update dependencies

    theseanything committed Dec 2, 2024
    Configuration menu
    Copy the full SHA
    e54299c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    bcec631 View commit details
    Browse the repository at this point in the history

Commits on Dec 4, 2024

  1. Fixup style and missing test

    This are stylistic changes and missing test for invalid json in the
    details column.
    theseanything committed Dec 4, 2024
    Configuration menu
    Copy the full SHA
    2bd126d View commit details
    Browse the repository at this point in the history