Problem background: (Simplified, but same idea) A scalable web-service that adds two numbers and returns result. There is no state being saved. The client sends a HTTP POST where the 2 numbers to be added are part of the body. The Server adds the numbers and responds with the summation in the body of the HTTP response.
Question: I want to deploy the service on Azure. Should I create a web-role or a worker-role? Which would be more performant for the above stated problem?
I tried creating a prototype using worker-role and there are parts (like handling application/xml mime types in http-post) which seem to be difficult to do in a worker role. Things like the GlobalConfiguration classes are unavailable by default.
Depending on the implementation of the web-service, the typical priority would be to only take on the responsibility of a layer in the infrastructure if you have to. E.g. Apps Services gives you the least responsibility, but is a good option if you implement the web-service in ASP.NET, node.js, php and more. Web Roles gives you more control over the IIS part and still supports ASP.NET, php and more. A worker role is typically used for OWIN implementations of a web-service - i.e. you do not rely on IIS.
/Mikkel