0

I am working on a .Net application that uses the WCF to communicate with the business layer. The WCF services are hosted in a windows service.

Now I am transferring the application to a cloud application using the windows azure platform, so I hosted my WCF service in a worker role and they are working normally.

I want to know if this is the correct decision to host the WCF services in a worker role or is there any another better solution to do so.

Ghyath Serhal
  • 7,466
  • 6
  • 44
  • 60
  • Can you share some details around the decision to host the service in a windows service vs. in IIS? broadly speaking the same consideratoins will apply in Azure when choosing between a web role and a worker role.... – Yossi Dahan Dec 12 '11 at 22:42

1 Answers1

1

You only have (2) options - Web or Worker Role (or VM - but that isn't useful here). Worker Roles will never restart to release memory, while Web Roles will recycle (unless using IIS autostart/AlwaysRunning). Essentially - they are doing the same thing (they even use the same host). The only issue I could see is how IIS manages process lifetime versus a standard windows always-running process. The other consideration is that IIS (web role) probably has more security checks and permissions than the standard windows process (worker role). I would certainly take a look at improving the default security of your WCF host.

Community
  • 1
  • 1
SliverNinja - MSFT
  • 31,051
  • 11
  • 110
  • 173