What phisical architecture for asp.net core microservices application

Gianlorenzo De Bartolomei 1 Reputation point
2022-03-25T09:56:38.357+00:00

Hi!
We have an asp.net core microservices architecture deployed on single Windows Server/IIS web server and we are using Ocelot as API Gateway.
We should soon make our application available to 400 users at the same time, so we're assuming it's best to add another Windows Server/IIS web server for balancing and performance reasons.
We were first wondering how we can make web api scalable without using dockers technology.
Then we would wanted to know how the balancing of requests should be handled, is a third node necessary? If so, the requestes could be managed with the Ocelot web api gateway or another type of product is required?

Thank's in advance for your suggestions.

Internet Information Services
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,129 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 54,621 Reputation points
    2022-03-25T15:22:53.417+00:00

    Ocelot is a simple reverse proxy middleware to make micro services look like a single host. For load balancing you need a load balancing service. This is reverse proxy that makes server servers look like one.

    You can load balance each microservice, or just load balance the Ocelot servers.

    If you don’t have a load balance server you can also supply multiple ipaddress for the dns entry, and configure the dns server to round robin.

    You can use docker to host or just use iis to host. Docker is popular for micro services because it allows them to be isolated for deployment. And there are docker scaling and management tools.

    Note. It appears you picked an architecture without understanding it’s features or limitations. This solution is often chosen when you have the supporting infrastructure, or have large development teams, or need large scaling.

    0 comments No comments

  2. Gianlorenzo De Bartolomei 1 Reputation point
    2022-03-25T17:28:46.147+00:00

    Thanks for your reply Bruce-SqlWork!
    Yes, I think you are right, we have adopted that type of architecture by not fully understanding all aspects.
    What is the reverse proxy you suggest? Is there a good open source product?
    Since we don't already know very well microservices architecture, we don't feel very confident about starting also to use dockers.
    So if we don't want to use dockers, could IIS offer tools for scaling and management?Otherwise what other solution do you suggest?

    0 comments No comments

  3. Bruce (SqlWork.com) 54,621 Reputation points
    2022-03-25T18:26:05.56+00:00

    there are 2 types of scaling, scale-up (bigger, faster server), and scale out (add servers). scale out with web servers is typically done with a load balancer. this can be separate hardware, or software.

    https://kemptechnologies.com/what-is-load-balancing/

    Microsoft has a software load balancer

    https://learn.microsoft.com/en-us/windows-server/networking/sdn/manage/configure-slb-and-nat

    then there are security concerns. typically you do not want the web-UI server to have direct access to databases/etc, you want then to call a backend webapi that supplies the service. so minimum website is three servers, UI web server, Webapi Server and database server. if you don't have three servers, then typically you would use a virtual machines or containers to host each service. Container are popular, because you don't need a separate O/S license for each container, just the host.

    Micro services are just a webapi service. the rule is one database per micro service and can be independently deployed. because they are loosely coupled, and deployed separate of each other, a micro service team to work totally independent of other teams.

    One IIS server could host all the micro services as separate vdirs. then you could scale with load balancing. but if you want to scale by putting the micro services on separate servers, then a library like Ocelot can make this simpler. The UI service calls Ocelot (one url), and Ocelot calls the actual servers.

    You can load balance the micro services as required.

    Micro services are popular with cloud hosting or docker hosting framework with scaling, because they are easy to configure.

    0 comments No comments