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

Gatewayd is no longer stateless after adding LoadBalancer #16

Open
sinadarbouy opened this issue Sep 25, 2024 · 1 comment
Open

Gatewayd is no longer stateless after adding LoadBalancer #16

sinadarbouy opened this issue Sep 25, 2024 · 1 comment

Comments

@sinadarbouy
Copy link
Contributor

Description:

After adding a LoadBalancer to Gatewayd, the application is no longer stateless. This change impacts the architecture and might require adjustments to the Helm chart and deployment strategy.

For example, if we use strategies like weighted load balancing or consistent hashing, data might be stored in the memory of one pod. If a second client request is routed to another pod, that pod will be unaware of the previous state, potentially leading to inconsistent behavior.

Proposal:

  • We may need to switch from a Deployment to a StatefulSet to better manage the stateful nature of Gatewayd.
    • if we go with leader election, the order provided by the StatefulSet would be beneficial in ensuring proper sequencing and coordination among pods.
  • Implementing leader election or gossip protocols within Gatewayd could help coordinate the nodes, ensuring high availability and consistency across instances.

Suggested Next Steps:

  • Explore options for implementing leader election or gossip protocols within Gatewayd.

Any thoughts or feedback on this approach would be appreciated!

@mostafa
Copy link
Member

mostafa commented Sep 25, 2024

This sounds good and I already wrote an epic ticket a while ago that relates to consensus here:

I'm thinking about implementing Raft, but let's continue the discussion on that ticket and possibly create more linked ticket to that one.

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

No branches or pull requests

2 participants