{"id":20500088,"url":"https://github.com/zevaverbach/studying-rate-limiting","last_synced_at":"2025-03-05T19:29:14.467Z","repository":{"id":187720626,"uuid":"677448200","full_name":"zevaverbach/studying-rate-limiting","owner":"zevaverbach","description":"I'm getting my mind around rate limiting, starting with some in-app implementations.","archived":false,"fork":false,"pushed_at":"2023-08-12T05:41:49.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"trunk","last_synced_at":"2025-02-28T19:13:44.082Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zevaverbach.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-11T15:44:33.000Z","updated_at":"2023-08-11T15:45:00.000Z","dependencies_parsed_at":"2025-01-16T06:49:14.492Z","dependency_job_id":"db362307-381d-4bfc-8f43-a30e114e9703","html_url":"https://github.com/zevaverbach/studying-rate-limiting","commit_stats":null,"previous_names":["zevaverbach/studying-rate-limiting"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zevaverbach%2Fstudying-rate-limiting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zevaverbach%2Fstudying-rate-limiting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zevaverbach%2Fstudying-rate-limiting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zevaverbach%2Fstudying-rate-limiting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zevaverbach","download_url":"https://codeload.github.com/zevaverbach/studying-rate-limiting/tar.gz/refs/heads/trunk","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242090850,"owners_count":20070240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T18:19:45.709Z","updated_at":"2025-03-05T19:29:14.430Z","avatar_url":"https://github.com/zevaverbach.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Purpose\n\nThis repository contains my implementations and explorations of rate limiting, drawn initially from the book _System Design Interview_.\n\nI'm embarking on this in order to get a great software engineering (probably back-end) job, and at the moment I have Happy Scribe in mind since I have an interview with them on August 24th, directly after our family vacation in Greece.\n\nOver a year ago (early 2022) I did a job search, and some of the interview processes ended right before or after the system design phase, so it's obviously something I need in my portfolio to truly be considered for senior dev roles. While I'd love to get a job as a junior or mid-level, my salary requirements and age (45) push me towards senior. That, and maybe the fact that I'm a decent programmer by now.\n\n# TODO\n\n- [ ] implement token bucket\n  - [ ] in-app\n    - [x] in-memory, lazy refill\n    - [ ] redis, process to refill\n- [ ] implement leaky bucket\n  - in-app\n    - [x] redis\n    - [ ] redis cluster\n    - [ ] Flask middleware - https://flask.palletsprojects.com/en/2.1.x/quickstart/#hooking-in-wsgi-middleware\n  - [ ] NGINX - https://leandromoreira.com/2019/01/25/how-to-build-a-distributed-throttling-system-with-nginx-lua-redis/\n              - https://www.nginx.com/blog/rate-limiting-nginx/\n  - [ ] AWS API Gateway\n  - [ ] HAProxy Stick Tables  - https://www.haproxy.com/blog/introduction-to-haproxy-stick-tables\n  - [ ] Cloudflare (Spectrum?)\n- [ ] implement expiring tokens\n- [ ] implement fixed window counter\n- [ ] implement sliding window log\n- [ ] implement sliding window counter \n- [ ] use session IDs or API keys instead of IP address\n- [ ] set headers appropriately in each case: https://www.ietf.org/archive/id/draft-polli-ratelimit-headers-02.html#name-ratelimit-headers-currently\n- [ ] implement different rate limiting for each endpoint, using a `cost` variable for a given task","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzevaverbach%2Fstudying-rate-limiting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzevaverbach%2Fstudying-rate-limiting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzevaverbach%2Fstudying-rate-limiting/lists"}