Deploying same microservice many times in my cluster to achieve faster performance

2/7/2018

Fairly new to containerized applications

We're building an app via containers and when we deployed it to GKE, we're experiencing a slow performance when a microservice responsible of processing images and returning json results is taking at almost 30 seconds per call.

When we checked the utilization of the cluster, it's only showing around 1% of the CPU. This made us conclude that it was not a compute resource bottleneck.

What I want to know are the two following things:

  • Would increasing containers of the same microservice help in accommodating more 'parallel' calls of the microservice?
  • How can I optimize the container to take advantage of more computational power to speed up its processing?

Thank you!

Best Regards, Mervinlee Tan

-- Core7
architecture
kubernetes

1 Answer

2/7/2018

If you don't experience a high CPU usage my guess is that you need to adjust your algorithm.

You can use a Kubernetes replicaset or deployment to run multiple instances of the same container and use a service in front of them to loadbalance request to each container instance.

-- Lukas Eichler
Source: StackOverflow