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

Voting app (sample) doesn't work in kubernetes #6162

Open
slawomirpiotrowski opened this issue Sep 14, 2023 · 0 comments
Open

Voting app (sample) doesn't work in kubernetes #6162

slawomirpiotrowski opened this issue Sep 14, 2023 · 0 comments

Comments

@slawomirpiotrowski
Copy link

Hello,

I have tried to launch the sample (voting app) on kubernetes (aks), and:

  1. dashboard doesn't work even if documentation says it's built in.

fixable with:

  • adding nuget reference to OrelansDashboard
  • adding orleansBuilder.UseDashboard(options => { }); to program.cs
  1. dashboard was documented to be able to include linux specific and windows specific counters. I was not able to enable that.

  2. provision.ps1 is not able to set up container. set up container has admin account disabled but script expects to be able to use it.

fixable with:

  • enabled it using azure web interface. not sure how to script that (you might prefer to script that).
  1. application doesn't compile using docker build

fixable with:

  • changing aspnet and sdk versions in dockerfile from 6.0 to 7.0
  1. compiled and published application doesn't start on kubernetes (aks)

fixable with:

  • code to support kubernetes was commented out in program.cs; restorting helps to at least start the application
  • requires adding nuget packages about orleans persistence
  1. compiled and published application works only with 1 replica

trying to start it with multiple replicas causes error with connecting to signalr (sometimes it works, but usually it doesn't).

it looks like application is not set up to use a backplane for signalr (redis for example) so it doesn't work if signalr connection is directed to another pod than original request.

tried to fix that by adding a line (to kubernetes initialisation code):
builder.Services.AddSignalR().AddStackExchangeRedis(redisAddress);
but unfortunatelly it doesn't fix the problem.

it can be worked around by enabling session affinity by clientip in aks load balancer, but it's only a work around as real life applications can be used from traveling cell phones and their ip addresses can change when traveling. signalr backplane should be able to fix that, but I have failed to find out how.

  1. data protection storage is not enabled, so session keys are stored only locally. it can break client sessions if multiple pods are used.

fixable with:

  • adding to program.cs (kubernetes initialisation):
    builder.Services.AddDataProtection()
    .PersistKeysToStackExchangeRedis(ConnectionMultiplexer.Connect(redisAddress))
    .SetApplicationName("votingapp");
  • requires nuget packege to support redis persistence to data protection

So in short it looks like demo application supposed to show how to use orleans on kubernetes is not ready to be launched on aks. And what is worse from my perspective is that I have failed to configure signalr backplane that would work without session affinity.

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

1 participant