Atakan Yağan
Atakan Yağan

Reputation: 1

Can I horizontally scale only a particular "service" in service oriented architecture?

I want to reduce the load of one of the services with horizontal scaling. In service-oriented architecture, do I have to copy or move(whatever you say) all services to the server I will add, since each of the services is a separate project?

Can I carry only the service I want?

Upvotes: 0

Views: 148

Answers (1)

AndrewR
AndrewR

Reputation: 1740

In fact, ability to scale services independently is one of major advantages with micro-services. Typically, as time goes, a service would get more and more customers (other services in this case). So the service should be scalable to support increased load.

More specific: a service A is called by two other services, B and C. And A is scaled properly to handle that load. At some point, there is a new service D to start calling A. In that case, the team owning service A will do capacity calculations and will scale out their service. The interesting aspect is, that neither service B nor C will even know that service A has scaled out.

In your question you have this statement: "reduce the load of one of the services with horizontal scaling". Technically, if you horizontally scale out a service, the total load will stay the same, but each individual instance of the service (each server/container/etc) will need to support less load. This is a common case to balance throughput and latency in a service.

As for "do I have to copy or move(whatever you say) all services to the server I will add, since each of the services is a separate project" - no, you definitely should scale out only services on as needed basis.

To clarify what is a service (one of different definitions): a service is a logical component of your architecture, service executes specific functions.

The implementations of service very largely: e.g. some services is just a single service with a singe process, some a set of boxes/containers behind a load balancer, and some services a sets of load balancers and servers to support regionalization.

It is not uncommon to have several services/processes/apps being deployed to the same physical service. And then these services are moved around as needed.

Upvotes: 1

Related Questions