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

Getting postgres sync going #15

Merged
merged 5 commits into from
Jan 31, 2024
Merged

Getting postgres sync going #15

merged 5 commits into from
Jan 31, 2024

Conversation

plor
Copy link
Contributor

@plor plor commented Jan 31, 2024

I want to push up my recent changes, it is on a few different fronts. There are some rate limiting attempts (currently counts down the "QUOTA" value in redis until it is 0). But the last bit here is a postgres listener that watches for notify events so it can respond to them (add to redis). We'll watch specific tables and make sure our cache is as fresh as possible. There will also be a periodic push to postgres to keep the write side of the cache current. Open to comments or questions on this.

plor added 5 commits January 30, 2024 16:22
 * planning on building a multi-bucket leaky bucket limiter
 * treat top bucket as the remaining relays (from billing)
 * buckets leak to lower buckets based on rate
 * bottom bucket decrements on successful relays
 * still setting up plugin system so critical logic is separated from
   business logic (should request go through)
* Added limiter type for cancelling flow
* Auth is a special limiter
* Setting up leaky bucket limiting, need to have some special wicks
* hooking up a couple more things, now gives 401 when quota runs out
* Listens for events (currently hardcoded)
* Will push result of notification to redis
@plor plor requested a review from wtfsayo January 31, 2024 00:48
@plor plor merged commit a13f204 into develop Jan 31, 2024
@plor plor deleted the pgnotify branch January 31, 2024 17:48
@plor plor linked an issue Feb 6, 2024 that may be closed by this pull request
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.

Create structure for pass-through cache
2 participants