docs/root/intro/arch_overview/operations/hot_restart.rst
.. _arch_overview_hot_restart:
Ease of operation is one of the primary goals of Envoy. In addition to robust statistics and a local
administration interface, Envoy has the ability to “hot” or “live” restart itself. This means that
Envoy can fully reload itself (both code and configuration) without dropping existing connections
during the :ref:drain process <arch_overview_draining>. However, existing connections are not
transferred to the new envoy process: they must complete during the drain process or be terminated.
The hot restart functionality has the following general architecture:
NeverImport. After hot restart is finished, the
gauges transported from the old process will be cleanup, but special gauge like
:ref:server.hot_restart_generation statistic <server_statistics> is retained.--drain-time-s option and as more time passes draining becomes more aggressive.--parent-shutdown-time-s option. Note
that the --parent-shutdown-time-s option is independent of the --drain-time-s value, and so
the parent shutdown time should be set to a larger value.restarter/hot-restarter.py <restarter/hot-restarter.py>.
This parent process is usable with standard process control utilities such as monit/runit/etc.Envoy's default command line options assume that only a single set of Envoy processes is running on
a given host: an active Envoy server process and, potentially, a draining Envoy server process that
will exit as described above. The :option:--base-id or :option:--use-dynamic-base-id options
may be used to allow multiple, distinctly configured Envoys to run on the same host and hot restart
independently.
.. note::
Currently, updating a listener's :ref:socket_options <envoy_v3_api_field_config.listener.v3.Listener.socket_options> during a hot restart isn't supported.
The old process socket options will be used. If it is required to update socket options either do a full restart or perform an LDS based listener updated.
.. note::
This feature is not supported on Windows.
By default, Envoy uses :ref:reuse_port <envoy_v3_api_field_config.listener.v3.Listener.enable_reuse_port> sockets on Linux for better
performance. This feature workers correctly during hot restart because Envoy passes each socket
to the new process by worker index. Thus, no connections are dropped in the accept queues of
the draining process.
.. attention::
In the uncommon case in which concurrency changes during hot restart, no connections will be dropped if concurrency increases. However, if concurrency decreases some connections may be dropped in the accept queues of the old process workers.