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

AWS Discovery #9

Open
guersam opened this issue Sep 8, 2022 · 8 comments
Open

AWS Discovery #9

guersam opened this issue Sep 8, 2022 · 8 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@guersam
Copy link

guersam commented Sep 8, 2022

Thanks for open-sourcing shardcake, @ghostdogpr and Devsisters!

I'd like to port a running akka cluster to shardcake, and the largest blocker is the service discovery.

We have an Akka cluster that is running on ECS Fargate instead of Kubernetes so that we're using ECS discovery module provided by Akka Management:

https://doc.akka.io/docs/akka-management/current/discovery/aws.html

@ghostdogpr
Copy link
Collaborator

This can be done easily by providing an implementation of PodsHealth using ECS API, see https://devsisters.github.io/shardcake/docs/customization.html#health

The Kubernetes one is only a few lines long: https://github.com/devsisters/shardcake/blob/series/2.x/health-k8s/src/main/scala/com/devsisters/shardcake/K8sPodsHealth.scala

@ghostdogpr
Copy link
Collaborator

Btw if someone implements it, we'll happily accept the contribution!

@thiloplanz
Copy link

Conceptual question about this: Are these infra-specific health-checks in any way superior the built-in "ping" health check? That one is also very reliable (right?), works out of the box and does not require to set up access permissions to infra API for your application.

@ghostdogpr
Copy link
Collaborator

ghostdogpr commented Sep 8, 2022

In case of network issue, the ping might fail even though the pod is actually alive processing messages. However the infra (like Kubernetes) knows if the pod is alive or not because it's in charge of its lifecycle. Basically we rely on the built-in logic of the infrastructure to handle things like cluster split, etc.

@thiloplanz
Copy link

Hmm. I guess that can cut both ways. If the ping fails because of network issues, payload messages might fail for the same reason, even though Kubernetes knows that the pod is alive. In that scenario the ping healthcheck is closer to "proof in the pudding". 🤔

@ghostdogpr
Copy link
Collaborator

ghostdogpr commented Sep 8, 2022

We don't want to rebalance as we're not sure the pod is gone. Otherwise you might end up with the same shard on 2 different pods.

@ghostdogpr ghostdogpr added good first issue Good for newcomers enhancement New feature or request labels Sep 14, 2022
@grouzen
Copy link

grouzen commented Nov 22, 2023

Hello! I'm wondering how to test it during development, considering that localstack's EKS module is available in the Pro version only.

@ghostdogpr
Copy link
Collaborator

ghostdogpr commented Nov 23, 2023

Hello! I'm wondering how to test it during development, considering that localstack's EKS module is available in the Pro version only.

I don't have a great solution for that, we tested the k8s one in a real environment...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants