question

GianlorenzoDeBartolomei-0716 avatar image
0 Votes"
GianlorenzoDeBartolomei-0716 asked Bruce-SqlWork answered

What phisical architecture for asp.net core microservices application

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.

windows-server-iisdotnet-aspnet-core-mvcdotnet-aspnet-core-webapi
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Bruce-SqlWork avatar image
0 Votes"
Bruce-SqlWork answered Bruce-SqlWork edited

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.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

GianlorenzoDeBartolomei-0716 avatar image
0 Votes"
GianlorenzoDeBartolomei-0716 answered

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?

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Bruce-SqlWork avatar image
0 Votes"
Bruce-SqlWork answered

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://docs.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.



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.