• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

gatewayd-io / gatewayd / 12329462793
60%

Build:
DEFAULT BRANCH: main
Ran 14 Dec 2024 11:37AM UTC
Jobs 1
Files 62
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

14 Dec 2024 11:25AM UTC coverage: 62.624% (+0.06%) from 62.563%
12329462793

push

github

web-flow
feat(raft): Implement Raft-based Consistent Hash State Management (#636)

* feat: Add Raft consensus for consistent hashing

This commit introduces Raft consensus to maintain consistency of hash-to-proxy
mappings across multiple GatewayD instances. Key changes include:

- Add new Raft package implementing consensus protocol using HashiCorp's Raft
- Integrate Raft with consistent hashing load balancer
- Store proxy mappings in distributed state machine
- Add configuration options for Raft cluster setup
- Implement leadership monitoring and peer management
- Add FSM snapshot and restore capabilities

The implementation ensures that hash-to-proxy mappings remain consistent across
cluster nodes, improving reliability for consistent hash-based load balancing.

* refactor: update consistent hash implementation with block-based proxy mapping

- Replace proxy ID with block name for consistent hash mapping
- Remove direct raft node dependency from ConsistentHash struct
- Add ProxyByBlock map to Server for block-based proxy lookups
- Include group name in hash key generation for better distribution
- Add proxy initialization during server startup
- Update FSM to use consistent naming for hash map storage

This change improves the consistent hashing mechanism by using block names
instead of proxy IDs, making it more aligned with the block-based
architecture while maintaining backwards compatibility with the original
load balancing strategy.

* refactor: remove proxy ID and related functionality

- Remove unused UUID-based ID field from Proxy struct
- Remove GetID() method from IProxy interface and Proxy implementation
- Remove GetProxyByID() method from Server struct
- Remove uuid package dependency

The proxy ID was not being used meaningfully in the codebase, so removing it
simplifies the proxy implementation.

* feat(raft): Add Raft integration tests and consistent hash improvements

This commit introduces comprehensive Raft testing infrastructure and enhance... (continued)

369 of 570 new or added lines in 10 files covered. (64.74%)

4906 of 7834 relevant lines covered (62.62%)

10.15 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
4
83.61
-4.15% network/consistenthash.go
5
72.12
-0.2% cmd/run.go
5
63.87
0.06% config/config.go
7
85.0
-8.15% plugin/utils.go
10
83.05
testhelpers/raft_helpers.go
16
60.98
raft/proto/raft_grpc.pb.go
16
58.97
raft/rpc.go
31
66.3
raft/proto/raft.pb.go
107
56.68
raft/raft.go
Jobs
ID Job ID Ran Files Coverage
1 12329462793.1 14 Dec 2024 11:37AM UTC 62
62.62
GitHub Action Run
Source Files on build 12329462793
  • Tree
  • List 62
  • Changed 11
  • Source Changed 0
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • c94c4759 on github
  • Prev Build on main (#11778041607)
  • Next Build on main (#12329861314)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc