Golimit
Infrastructure
rate limiting
SHOW HN2018
How HN took it
0 positive, 13 neutral or asking, 0 mixed, 3 critical, out of 16 comments about the project. Thread score -0.14.
Design: 0 for, 2 againstExecution: 0 for, 1 against
The thread, comment by comment
Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.
positive neutral or mixed critical about another commenter or something else the maker
What HN said
What people liked
Looks useful and interesting project
From 2 comments
Thanks, looks quite useful. However it seems based on https://github.com/uber/ringpop-go which is marked as no longer active... What are you using to implement rate limiting ?
freeman478 on HNIf the deployment is using docker (i.e. haproxy in one container, the sidecar in another), “local” TCP can be a big bottleneck. I was using TCP for redis over a local docker…
chatmasta on HN
Objections
Relies on Ringpop, which is no longer maintained
From 2 comments
Thanks, looks quite useful. However it seems based on https://github.com/uber/ringpop-go which is marked as no longer active... What are you using to implement rate limiting ?
freeman478 on HNIf the underlying project is unsupported, and you're only using a part of it, and the licenses permit, I'd suggest just pulling the relevant code into your own. That eliminates…
jerf on HN
Local HTTP sidecar interface adds overhead; Unix sockets preferred
From 2 comments
Why does this implement an HTTP interface on the sidecar? Isn’t that a lot of unnecessary overhead for incrementing a counter? The connection will always be on a local interface,…
chatmasta on HNIf the deployment is using docker (i.e. haproxy in one container, the sidecar in another), “local” TCP can be a big bottleneck. I was using TCP for redis over a local docker…
chatmasta on HN
In-memory counters are lost on failure and map may grow without bound
From 2 comments
The project looks cool. Just want to understand how counter syncing works here, have you implemented CRDTs? Since, everything is in RAM, if service goes down, all counters' data…
ashish6111988 on HNSkimming the bucket code, it appears that the rate-limiting information is stored in a map. It doesn't appear to implement an LRU or attempt to clean up stale entries. If I feed…
aaron42net on HN
Requests
Support Unix domain sockets instead of HTTP
From 2 comments
Why does this implement an HTTP interface on the sidecar? Isn’t that a lot of unnecessary overhead for incrementing a counter? The connection will always be on a local interface,…
chatmasta on HNIf the deployment is using docker (i.e. haproxy in one container, the sidecar in another), “local” TCP can be a big bottleneck. I was using TCP for redis over a local docker…
chatmasta on HN
Add durability for counters
From 1 comment
The project looks cool. Just want to understand how counter syncing works here, have you implemented CRDTs? Since, everything is in RAM, if service goes down, all counters' data…
ashish6111988 on HN
Questions
How is counter syncing implemented (CRDTs)?
From 2 comments
The project looks cool. Just want to understand how counter syncing works here, have you implemented CRDTs? Since, everything is in RAM, if service goes down, all counters' data…
ashish6111988 on HNThanks, The counters are synced in CRDT way , every node has both local and global counters and local counter are synced asynchronously with global counter periodically or on…
yogeshpandey on HN
Can it integrate with HAProxy as a sidecar?
From 2 comments
If I’m reading this right, is it possible to use the sidecar technique to install this along keep my existing load balancer architecture? For example, if every server has an…
chatmasta on HNyou can write LUA code in Haproxy to call golimit on http endpoint. and react based on response
yogeshpandey on HN
Alternatives named
ratelimitj (Java)
From 1 comment
Totally biased opinion, but I think you should check out https://github.com/mokies/ratelimitj if you are Java based.
crbaker on HN
Prefab hosted rate limits
From 1 comment
Also biased, but if you need the functionality and don’t want to run it yourself there is https://www.prefab.cloud/documentation/basic_rate_limits
jdwyah on HN