All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Allow binding the daemon to a random port by @pzduniak in #167
- Adjust tracing detail by @Baliedge in #166.
- Adjust certain functions to debug level tracing. Mainly private methods are debug tracing.
- Give background async goroutine traces descriptive names.
- Update holster for additional functionality.
- Adjust dependency versions to ensure compatibility with holster.
- Simplify OTel traces by @Baliedge in #165.
- Update dependencies to patch for CVE-2022-27664 by @Baliedge in #164.
- Token bucket fix for Gregorian duration by @akshay-livespace in #162.
- Token bucket algorithm would reset "remaining" for a request within milliseconds when using behavior DURATION_IS_GREGORIAN.
- This is happening because expiry calculation for behavior DURATION_IS_GREGORIAN, was calculated but never updated.
- Add environment variable to set minimum TLS version on server tls config by @denkyl08 in #160.
- No functional change.
- GitHub Actions provide version consistency check by @Baliedge in #158.
- Update Go to 1.19.2 by @pzduniak in #155
- Fix negative hits when remaining 0 by @Loosetooth in #157.
- Bump etcd to v3.5.5 by @thrawn01 in #154
- Now using the logger passed in on initialization by @thrawn01 in #153
- Bumps protobuf from 3.15.0 to 3.18.3 by @dependabot in #152.
- Promote asyncRequests() span to info level so it's not filtered out by default by @Baliedge in #150.
- Tag some spans as debug by @Baliedge in #149.
- Update holster to get new
tracing
functionality. - Tag spans with debug log level to improve signal:noise ratio.
by @Baliedge in #148.
- Update Go to 1.17.13 by @pzduniak in #147.
- Refactor tracing using holster OpenTelemetry tooling in #125.
- OpenTelemetry is newer standard that supercedes OpenTracing.
- This change migrates to OpenTelemetry. However, the traces created in Jaeger remain the same structure and level of detail.
- Breaking change: Configuration for OpenTelemetry changes from OpenTracing. See
jaegertracing.md
for details.
- Update Go to 1.17.11 by @pzduniak in #145.
- Add support for pre-1.23 Kubernetes versions in #144.
- Update to Go 1.17.10 by @pzduniak in #143.
- Publish a Helm repository by @pzduniak in #139.
- Publish multi-arch images #142
- Helm chart add image pull secrets #141
- Pin Go to 1.17.9, always pull the base images #140
- Log level and format config.
- Various Helm chart fixes.
- Update prometheus client_golang to resolve CVE-2022-21698.
- Added metric to track number of cache evictions which involve unexpired entries
- Allow configuration of ServerName used by peer clients to avoid necessity of IP SANs in Cert #133
- Apply security updates to Golang libraries to fix CVE-2021-38561, CVE-2021-33194, and CVE-2020-29652.
- Added performance optimizations to ensure batching behavior does not cause additional performance bottlenecks at scale.
- Added Opentracing support in gRPC service and various critical functions.
- Added many more useful Prometheus metrics.
- Refactored GetRateCheck calls to use a hash ring for parallel processing, instead of locking a shared mutex to process requests sequentially.
- Rate checks now respect client's context deadline and will abort processing immediately if canceled.
- Fixed stack overflow panic in token bucket ratelimit checking.
- Fixed leaky bucket ratelimits expiring prematurely.
- Include s.conf.Behaviors in Config for NewV1Instance
- Moved official gubernator container to ghcr.io
- Fixed async send when sending multiple rate limits to other nodes
- Fix leaky bucket reset time #110
- Fixed infinite loop in async send
- Added optional os and golang internal metrics collectors
- JSON responses are now back to their original camel_case form
- Fixed reporting of number of peers in health check
- Implemented performance recommendations reported in Issue #74
- Add support for burst in leaky bucket #103
- Add working example of aws ecs service discovery deployment #102
- Deprecated github.com/golang/protobuf was replaced with google.golang.org/protobuf
- github.com/grpc-ecosystem/grpc-gateway was upgraded to v2
- github.com/coreos/etcd was replaced with go.etcd.io/etcd/client/v3. This is an API breaking change. It entailed updated of github.com/mailgun/holster to the next major version v4
- Deprecated ConsistentHash was removed
- HashBytes64 is replaced with HashString64 to avoid unsafe conversions that is reported by go vet since v1.16 golang/go#40701 (comment)
- Add GUBER_GRPC_MAX_CONN_AGE_SEC to limit GRPC keep alive
- Fix leaky bucket algorithm returning remaining more than limit
- Update the k8s example to reflect the latest changes from the release candidate.
- Respect SIGTERM from docker during shutdown
- Peer info provided to etcd and memberlist pools is now consistent
- Fixed a race in getGlobalRateLimit
- Fixed issues with EtcdPool
- Changes in preparation of MultiRegion support testing
- Added GUBER_K8S_WATCH_MECHANISM for k8s deployments.
- Fix leaky bucket algorithm
- Added TLS Support for both GRPC and HTTP interfaces #76
- Prometheus metrics are now prefixed with
gubernator_
- Switched prometheus Histograms to Summary's
- Changed gubernator.Config.GRPCServer to GRPCServers to support registering with GRPC instances on multiple ports.
- Gubernator now opens a second GRPC instance on a random localhost port when TLS is enabled for use by the HTTP API Gateway.
- Add Service Account to k8s deployment yaml
- Added
GUBER_DATA_CENTER
as a config option - Use
GUBER_PEER_DISCOVERY_TYPE
to pick a peer discovery type, removed 'Enable' options from k8s, etcd, and member-list. - Added
GUBER_ADVERTISE_ADDRESS
to specify which address is published for discovery - Gubernator now attempts to detect the proper
GUBER_ADVERTISE_ADDRESS
if not specified - Gubernator now binds to
localhost
by default instead of binding to0.0.0.0:80
to avoid allowing access to a test version of gubernator from the network. - Fix inconsistent tests failing #57
- Fix GRPC/HTTP Gateway #50
- Renamed functions to ensure clarity of version
- Removed deprecated
EtcdAdvertiseAddress
config option - Refactored configuration options
member-list
metadata no longer assumes the member-list address is the same as the gubernator advertise address.- Now MD5 sums the peer address key when using replicated hash. This ensures better key distribution when using domain names or ip address that are very similar. (gubernator-1, gubernator-2, etc...)
- Now defaults to
replicated-hash
ifGUBER_PEER_PICKER
is unset - Added support for DataCenter fields when using etcd discovery
- Now storing member-list metadata as JSON instead of glob
- ETCD discovery now sets the IsOwner property when updating the peers list.
- Fix GUBER_PEER_PICKER_HASH and GUBER_PEER_PICKER
- Now warns if GUBER_PEER_PICKER value is incorrect
- Now ignoring spaces between
key = value
in config file
- Fix GUBER_MEMBERLIST_ADVERTISE_PORT value type
- Fixed race condition and updated tests for limit change
- Fix limit change not having effect until reset
- Allow cache users to invalidate a ratelimit after a specific time
- Changing limit and duration before expire should now work correctly
- Added Behavior RESET_REMAINING to reset any hits recorded in the cache for the specified rate limit
- TokenBucketItem is now provided when
OnChange()
is called instead ofRateLimitResp
- Fixed a bug in global behaviour where it would return an error if the async update had not occured before the a second request is made. Now it acts like it owns the rate limit until the owning node sends an update
- Always include reset_time in leaky bucket responses
- Fixed subtle bug during shutdown where PeerClient passed into goroutine could be out of scope/changed when routine runs
- Behavior is now a flag, this should be a backward compatible change for
anyone using GLOBAL or NO_BATCHING but will break anyone using
DURATION_IS_GREGORIAN. Use
HasBehavior()
function to check for behavior flags.
- Added
Loader
interface for only loading and saving at startup and shutdown - Added
Store
interface for continuous synchronization between the persistent store and the cache.
- Moved
cache.Cache
into thegubernator
package - Changed the
Cache
interface to useCacheItem
for storing and retrieving cached items.
- DURATION_IS_GREGORIAN behavior to support interval based ratelimit durations
- Fixed issue where switching to leakybucket was impossible
- Fixed rate would never decrease if the client continued to add hits and failed.
- Support for prometheus monitoring
- Support for environment based config
- Support for kubernetes peer discovery
- Support for GLOBAL behavior
- Improved README documentation
- GetRateLimits() now fetches rate limits asynchronously
- Now properly respecting the maxBatchLimit when talking with peers
- Minor log wording change when registering etcd pool
- Initial Release