All Projects → mopemope → firestarter

mopemope / firestarter

Licence: other
Firestarter: A process and shared socket manager

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to firestarter

hotelier
Tray App for Hotel Process Manager
Stars: ✭ 46 (-26.98%)
Mutual labels:  process-manager
Modd
A flexible developer tool that runs processes and responds to filesystem changes
Stars: ✭ 2,030 (+3122.22%)
Mutual labels:  process-manager
final-pm
Finally a good node.js process manager.
Stars: ✭ 21 (-66.67%)
Mutual labels:  process-manager
TrivialRC
A minimalistic RC system and process manager for containers and applications
Stars: ✭ 27 (-57.14%)
Mutual labels:  process-manager
Pm2
Node.js Production Process Manager with a built-in Load Balancer.
Stars: ✭ 36,126 (+57242.86%)
Mutual labels:  process-manager
SuperSocketLite
SuperSocket 1.6 버전의 .NET Core 포팅
Stars: ✭ 48 (-23.81%)
Mutual labels:  socket-server
Workerman
An asynchronous event driven PHP socket framework. Supports HTTP, Websocket, SSL and other custom protocols. PHP>=5.3.
Stars: ✭ 9,617 (+15165.08%)
Mutual labels:  socket-server
aioudp
Asyncio UDP server
Stars: ✭ 21 (-66.67%)
Mutual labels:  socket-server
Hotel
🏩 A simple process manager for developers. Start apps from your browser and access them using local domains
Stars: ✭ 9,736 (+15353.97%)
Mutual labels:  process-manager
pwa
An opinionated progressive web app boilerplate
Stars: ✭ 355 (+463.49%)
Mutual labels:  process-manager
exo
A process manager & log viewer for dev
Stars: ✭ 296 (+369.84%)
Mutual labels:  process-manager
Process
The Process component executes commands in sub-processes.
Stars: ✭ 6,942 (+10919.05%)
Mutual labels:  process-manager
electrom
Electrom is a resource management solution for Electron applications, which is convenient for performance management and friendly debugging of multiple windows.
Stars: ✭ 20 (-68.25%)
Mutual labels:  process-manager
nyx
Lean linux and OSX process monitoring written in C
Stars: ✭ 24 (-61.9%)
Mutual labels:  process-manager
go-eventserver
A socket server which reads events from an event source and forwards them to the user clients when appropriate
Stars: ✭ 18 (-71.43%)
Mutual labels:  socket-server
Oksocket
An blocking socket client for Android applications.
Stars: ✭ 2,359 (+3644.44%)
Mutual labels:  socket-server
forseti
Process balancer and distributor for Erlang/OTP
Stars: ✭ 27 (-57.14%)
Mutual labels:  process-manager
pwatch
Process watcher(pwatch)
Stars: ✭ 33 (-47.62%)
Mutual labels:  process-manager
zeeka
Secure global file sharing using tcp tunnels. Currently tunneling through localtunnel's public servers. Zeeka dedicated servers coming soon.
Stars: ✭ 21 (-66.67%)
Mutual labels:  socket-server
UltimaPHP
A modern Ultima Online server written in PHP
Stars: ✭ 123 (+95.24%)
Mutual labels:  socket-server

Firestarter: A process and shared socket manager

crates.io Patreon Build Status

Firestarter is a simple process and shared socket manager, it is designed like circus and einhorn, but lightweight and faster.

Firestarter can manage groups of processes and shared sockets like circus. And like einhorn we support manual ack. And you can control Firestarter daemon, such as increasing worker process from ctrl command.

Firestarter shares sockets using the systemd socket passing protocol (LISTEN_FDS).

Firestarter uses explicit configuration files rather than complex command line options.

Features

  • Easy install
  • Fast and saving memory
  • Using explicit configuration file
  • Support control command like circus
  • Support ack like einhorn
  • Execute upgrader program

Installation

You can get firestarter by installing it with cargo:

$ cargo install firestarter

Usage

Firestarter is process and shared socket manager. Run firestarter -h to see detailed usage.

firestarter
process and shared socket manager

USAGE:
    firestarter <SUBCOMMAND>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

SUBCOMMANDS:
    ctrl      Run control client
    help      Prints this message or the help of the given subcommand(s)
    list      Show worker names
    run       Run daemon
    status    Show worker status
    stop      Stop daemon

Example

$ firestarter run --config misc/config.toml

The configuration file uses toml. An example is below.

[worker1] # set worker group name.

# set to commands with their arguments that are executed when this worker is started.
# exec_start = "./demo/target/debug/demo"
exec_start = "/usr/bin/emacs --fg-daemon"

# set to commands to execute to stop the service started via exec_start.
# if you do not set it, sigterm will be sent to the exec_start process.
# note that upgrade ack does not use this command.
exec_stop = "/usr/bin/emacsclient --eval (kill-emacs)"

# set the number of startup processes.
numprocesses = 1

# set working directory.
# working_directory = "/tmp".

# set restart policy. default is none.
# none: not restart process.
# on-failure: restart the process if it is not completed normally.
# always: restart the process whenever you exit.
restart = "on-failure"

# set the seconds to delay the startup of the process.
# warmup_delay = 1

# start the process immediately without starting the process when connecting the client socket.
start_immediate = true

# set shared socket addresses.
# it also support unix domain socket. (e.g.: /tmp/foo.sock)
socket_address = ["127.0.0.1:4000", "127.0.0.1:4001"]

# set processes environment.
environments=["TEST_A=XXXX", "TEST_B=YYYY"]

# set upgrade ack type. this is similar to einhorn 's ACKs. timer is default.
# timer: it will terminate the old process after a certain time (sec).
# manual: send ack manually. For details, refer to einhorn's manual ack document
# none: no ack. simple stop and start
ack = "manual"

# set timer ack time in seconds. default 1sec.
# ack_timeout = 1

# set ack signal. default is SIGUSR2.
# ack_signal = "SIGUSR2"

# set uid.
# uid = 1000

# set gid.
# gid = 10

# set stdout to file.
# size and timed rotate supported.
# the format is below.
# size:<max file size>:<number of backup>:<output path>
# time:<rollover interval>:<type of interval>:<timzone for rotate>:<number of backup>:<output path>
# the type of timezeone for rotate,the list of possible values is below.
#‘U’UTC
#‘L’Local
# the type of interval,the list of possible values is below.
#‘S’Seconds
#‘M’Minutes
#‘H’Hours
#‘D’Days
#
# exmple
# stdout_log = "size:10240:5:/tmp/web1_out.log"
# it rolls over in 3 days and keeps 5 backups.
# stdout_log = "time:3:D:U:7:/tmp/web1_out.log"

# set stderr to file.
# it is the same as stdout.
# stderr_log = "size:10240:5:/tmp/web1_err.log"

# set process live check configuration.
# we will check the existence of the process (experimental).
# the process needs to periodically update the mtime of the file passed in environment variable FIRESTARTER_WATCH_FILE.
# the monitoring process kills the process when the mtime update interval exceeds the threshold. this is the same process as gunicorn's worker notify.
# the unit is seconds, and the default value is 0. (disable live check)
# live_check_timeout = 60

# set auto upgrade.
# it will send upgrade command when their command file is modified.
# it does the same processing as circus.plugins.CommandReloader.
# auto_upgrade = false

# set upgrader program.
# set to the upgrader command.
# run upgrade only when the upgrader command terminates normally.
# upgrader = "/a/b/upgrader --config abc"

# set upgrade timing.
# execute the upgrader command for each specified seconds.
# if not set, execute the upgrade command when executing the upgrade ctrl command.
# upgrader_active_sec=10
# upgrader_timeout=60

Control command

Firestarter also provides a client that controls the running daemon.

For example, you can check the status with the following command.

$ firestarter ctrl worker1 status
send ctrl command [status] to [worker1] worker
[worker1] active
processes [24170]
time 00:00:06

For details, please refer to the help firestarter ctrl -h.

Contributing

Contributions are extremely welcome! Please push PR to dev branch.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].