b0x0rz
b0x0rz

Reputation: 3981

all services on one port, or each service on its own port?

need to make a bunch (20+) of services (usually single purpose services - such as user management - with multiple methods).

is it better for each service to be on its own port / in its own project in visual studio OR do them all at once on a single port in a single project?

what is the best from scaling point of view? also if they are all deployed on a single machine, performance wise is there a difference between the two approaches?

somehow it makes sense to have them separate, so if for example, one of the services sees significantly higher use it can be scaled alone on multiple machines, do you agree?

Upvotes: 0

Views: 348

Answers (1)

Juan Gomez
Juan Gomez

Reputation: 1518

When it comes to web services the physical TCP/IP port is really not important, you should shoot for the standard HTTP port (80) and make sure you have adequate load balancing on the web server for the expected user load.

Performance on a server gets degraded when resources (memory or processing power) are on high demand, having your services on different ports won't change this situation, if your user load exceeds the resources available on just one server, you'll need to look into creating a server farm or deploying on a cloud service that can scale to you needs (Like Amazon EC2 or Microsoft Azure).

The project segmentation depends on functionality, services with similar functionality and that interact with related backend resources could be grouped together on the same projects, for scaling purposes, but there's no hard rule on how to segment your services on projects, is all common sense and trying to group similar functionalities.

Upvotes: 2

Related Questions