Skip to navigation

Run Behind a Load Balancer

View as MarkdownOpen in Claude

Deploy multiple replicas of the microservice and have them act like a single instance.

Service Description

The example uses Docker Compose to launch two instances of the VASP service and an NGINX service that distributes requests between them.

The instances synchronize by sharing their /workspace/completed/ and /workspace/input/ folders.

The compose file ensures that each instance of the VASP service is pinned to different CPU cores and the same GPU (device #0).

Test Description

The test runs a batch of calculations and ensures that all run correctly, then produce the correct output files.

The default number of calculations, 4, is small enough for the test to run quickly.

Prepare to run the tests by downloading VASP POTCAR files and storing their location as the VASP_POTCAR_PATH environment variable.

Run the test by calling ./run-test.sh.