Auto-scale Orthanc

Hi there,

I’m investigating if it’s possible to auto-scale Orthanc horizontally (more servers) without ending up in DB lock situations, or other trouble. CMRAD has an ecosystem deployed on AWS and today Orthanc is built on an EC2 virtual instance of fixed size. When Orthanc is experiencing high traffic, we have no mechanism to automatically add capacity without restarting the server. For example on Tuesday this week, we saw Orthanc maxing out on CPU capacity and we could not do anything about it without disrupting the service.

The default way AWS (and many other cloud providers) handle auto-scaling is by adding identical instances of the same server/service side-by-side behind a load-balancer. Our orthanc instance is already running behind a loadbalancer (which works well), so switching this on is as simply a matter of enabling the function. The load balancer is session-aware, so we can avoid a single user session splitting between different orthanc instances. However, now to my questions:

What happens when I have two parallel Orthanc instances pointing at the same postgreSQL DB for indexing and mounting the same file system for DICOM file storage?
Would such a setup get us into any kind of DB or file lock situation?
Was such a scenario ever tested?
Was the software designed to handle such auto-scaling and parallelism?

Any comments and experiences are more than welcome.
thank you all,

Hi Pär,

As a beginning of answer, you could have a look on that topic :!msg/orthanc-users/o_4prwUoxB0/YIrZ8IoxBAAJ


I am currently testing an orthanc + docker + nginx solution with reverse proxy on EC2 with auto-scaling, and has been running on staging yet. But I have difficulty simulating load in the orthanc in order to have a more real test.

I tried to deploy within AWS with ECS services, but I did not get much success.