Service deployment solutions
In this section, we are going to review some popular solutions for establishing service deployments. This section will help us to choose a deployment solution for our microservices.
Docker Swarm
Docker Swarm is a lightweight tool provided by Docker that allows us to run multiple containers and perform service discovery, load balancing, and scaling. Its benefits include Docker CLI support, relatively simple configuration, and quick setup.
In order to set up a Docker Swarm deployment, you need to prepare a configuration of one or multiple services, such as the following:
version: "3.7"
services:
example-service:
image: example-image
ports:
- "8000:8000"
Having the configuration in place, a Docker Swarm deployment can be executed by running a single command:
docker stack deploy -c example-config.yaml demo
Docker Swarm is generally a great fit for small-scale applications that don’t need...