> This page is for version latest (default).
> For other versions, use one of these documentation indexes:
> - latest (default): https://docs.nvidia.com/alchemi/vasp/latest/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/alchemi/vasp/llms.txt.

# Run Behind a Load Balancer

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`.

Download Example