I have a simple, CPU-bound, mono-CPU application running in a docker container.
Indeed it fully uses a single CPU on the instance when processing work.
As I understand, there are two main approaches to improve the performance of the application:
- rewrite the application so that it runs natively on multiple CPU
- run the application as many times as there are CPUs behind a loadbalancer (each instance would process a chunk of the workload)
What are the pros and cons of these approaches? How to select to the ideal one? Are there others?