Running and Managing Envoy

This guide describes how to run and manage Envoy, including using Docker for containerization and configuring Envoy as a systemd service for automatic startup.

Note

For important security best practices when running Envoy in production, please see the Security Considerations section in our Configuration Guide.

This guide provides instructions for both Docker and Podman. Use the tabs below to select your container runtime.

Running Envoy

To run Envoy with Docker, first create a named container (deephaven_envoy) that can be reused each time Envoy needs to start.

  • The YAML file created during configuration is used.
  • The Client Update Service's PEM file is used for the certificate. It is recommended to create a different one for a production installation.

If the container fails to start, run it in interactive mode by replacing -d with -it to view the output directly.

Managing the Docker Container:

  • List running containers:
  • View container logs:
  • Stop the container:
  • Start the container:
  • Delete the container:

To run Envoy with Podman, first create a named container (deephaven_envoy).

  • The YAML file created during configuration is used.
  • The Client Update Service's PEM file is used for the certificate. It is recommended to create a different one for a production installation.

If the container fails to start, run it in interactive mode by replacing -d with -it to view the output directly.

Managing the Podman Container:

  • List running containers:
  • View container logs:
  • Stop the container:
  • Start the container:
  • Delete the container:

Graceful reloads (hot restart)

Envoy supports hot restarts to apply configuration changes without downtime. This is useful when you need to update the envoy3.yaml file.

To trigger a hot restart, send the SIGHUP signal to the Envoy process.

Upgrading the Envoy version

To upgrade to a new version of Envoy, follow these steps:

  1. Pull the new image (replace vX.Y.Z with the target version):
  2. Stop the current container:
  3. Remove the old container:
  4. Start a new container using the original run command, but with the new version tag:
  1. Pull the new image (replace vX.Y.Z with the target version):
  2. Stop the current container:
  3. Remove the old container:
  4. Start a new container using the original run command, but with the new version tag:

Monitoring resource usage

You can monitor the CPU, memory, and network usage of the Envoy container in real-time.

Configuring Envoy as a systemd service

To run Envoy as a systemd service, create a service file at /etc/systemd/system/envoy.service.

The service file should be configured for your container runtime. The following examples include the ExecReload directive to support graceful reloads.

This configuration starts and stops the pre-existing deephaven_envoy Docker container.

This configuration restarts the deephaven_envoy Podman container.

Managing the systemd Service

After creating or editing the file, reload the systemd daemon and enable the service to start on boot:

  • Start the service:
  • Reload the configuration (hot restart):
  • View service status and logs:
  • Stop the service: