dotnet / orleans

Cloud Native application framework for .NET
https://docs.microsoft.com/dotnet/orleans
MIT License
10.1k stars 2.04k forks source link

WIP: Azure Kubernetes Service sample #4315

Closed jsukhabut closed 11 months ago

jsukhabut commented 6 years ago

I am working on a Azure Kubernetes sample with instructions on how to build and deploy into Kubernetes.

I could use feed back if this is what people what to see.

https://github.com/jms69/orleans/tree/akssample/Samples/2.0/Kubernetes

hokusp commented 6 years ago

thank you very much, that is exactly what I was looking for! I think orleans (2 on dotnet core) and managed kubernetes will be such a "killer" combo for development and deployment.

Would you recommend using Orleans.Clustering.Kubernetes for clustering?

jsukhabut commented 6 years ago

Thanks. I wasn’t sure if anyone would find it helpful. I’ll find some time to get back to finishing it.

Orleans 2 on dot net core will allow running one cluster on Service Fabric Windows (as an app or container) and a another on Kubernetes Linux as backup pairs which is pretty “killer”.

I can’t recommend anything because I have not run a Kubernetes-based Orleans app in production yet. I do have some opinions. For silo-to-silo discovery in Azure, the Azure storage for table membership is easy to read with tools in visual studio. Also, Azure storage is taking care of my state and reminder store so I don’t have to find another service. Orleans Clustering Kubernetes is self contained and runs in any Kubernetes cluster ( not Azure specific). Querying the membership table requires some knowledge of Kubernetes rest API.

For client discovery of a client container inside Kubernetes, I don’t like injecting the Azure Storage connection string in the client layer. This is why I used the DNS feature in Kubernetes here. Orleans.Clustering.Kubernetes is self contained and can be used at the client and silo.

You also have the option of deploying zookeeper or consul in your Kubernetes cluster from docker hub and use it as he cluster membership store.

hokusp commented 6 years ago

thanks. right, using service fabric and kubernetes as backups sounds awesome!

I will then go with azure storage because we will deploy to azure anyways.

I'm sure a lot more user will find your tutorial VERY helpful. But I almost didn't find it... even if it is not fully finished it would be helpful if it could be integrated into the official orleans samples and documentation or/and into the tutorial section.

ReubenBond commented 11 months ago

An Azure Kubernetes Service sample has been added: https://learn.microsoft.com/en-us/samples/dotnet/samples/orleans-voting-sample-app-on-kubernetes/