Signals are asynchronous notifications sent to a process (e.g., SIGTERM, SIGINT). A process can handle them with signal handlers, ignore them, or use default actions like termination.
Signals are used for control and lifecycle events:
Graceful shutdown pattern:
SIGTERM -> set flag -> stop accepting traffic -> flush -> exit