question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Silo as IHostedService on Azure App Service

See original GitHub issue

Summary

It works just fine when there is only one instance within the App Service Plan. Problems start when I scale out.

Background

I’m using an App Service Plan with 2x S3 instances inside of it. The silo is started as a singleton IHostedService that I’ve implemented. It is running within a .NET Core 2.0 API that translates the HTTP traffic into Grain calls. In this scenario GrainClient and Silo are both within the same application. First silo starts fine. Second silo gets stuck in “Joining” state, which then transitions to “Dead”.

Configuration

Orleans version: 2.0-beta3

SiloConfiguraton.xml

<OrleansConfiguration xmlns="urn:orleans">
<Globals>
  <SystemStore SystemStoreType="AzureTable"
               DeploymentId="MyDeployment"
               DataConnectionString="removed-for-github" />
  <Liveness LivenessType="AzureTable" />
</Globals>
<Defaults>
  <Networking Address="" Port="11111" />
  <ProxyingGateway Address="" Port="40000" />
</Defaults>
</OrleansConfiguration>

ClientConfiguration.xml

<ClientConfiguration xmlns="urn:orleans">
  <SystemStore SystemStoreType="AzureTable"
               DeploymentId="MyDeployment"
               DataConnectionString="removed-for-github" />
</ClientConfiguration>

Questions

  • Should I update to the recently released 2.0-rc1 Orleans?
  • Have I provided enough information?

CC @sergeybykov

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
turowiczcommented, Mar 12, 2018

That’s what I’ll have to do then. It would be so nice if Orleans could work on App Service. I did try to make it work by detecting which port is the process listening on but even though port was open they couldn’t connect over the “internal” network - probably due to proxy that you mention.

0reactions
Liversagecommented, Mar 12, 2018

do you think it is possible to run a Silo in App Service with instance count >1?

No, I don’t think it is possible. As far as I know an App Service is proxied by a web server listening on port 80 and 443. Running one instance works fine because your process listens on the loopback adapter without any “real” network communication. However, if you scale out the instances are unable to communicate.

You can connect an App Service to a Virtual Network using VNET Integration. This allows you to host your Orleans cluster on VMs or some other “execution mechanism” and connect an Orleans client in the App Service to the cluster connected to the Virtual Network.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Run IHostedService on only one instance of a scaled out ...
This service will run twice a day at the same time when my App Service is scaled out to 2 instances, resulting in...
Read more >
Orleans clients
Co-hosted clients​​ In this case, the client communicates directly with the silo it is attached to and can take advantage of the extra...
Read more >
Using an ASP.NET Core IHostedService to run Azure Service ...
This post shows how Azure Service bus subscription for topics or consumers for a queue, or can be used inside an ASP.NET Core...
Read more >
Implement background tasks in microservices with ...
The basic idea is that you can register multiple background tasks (hosted services) that run in the background while your web host or...
Read more >
Tutorial: Hello World with Microsoft Orleans - Nick's .NET Travels
... Orleans Silo (the backend), and can be hosted on an Azure App Service and uses Azure Table Storage (or Azure Cosmos DB)...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found