Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More process management stuff #69

Open
marcj opened this issue Mar 20, 2016 · 7 comments
Open

More process management stuff #69

marcj opened this issue Mar 20, 2016 · 7 comments

Comments

@marcj
Copy link
Member

marcj commented Mar 20, 2016

Beside the fact that we need to implement more http stuff (but in reactphp/http) we also need to give more tools for production environments like pm2 of the node world it does (https://github.com/Unitech/pm2).

Need is:

  1. Monitoring (like pm2 list)
  2. Zero downtime deployment
  3. Daemonize start command

php-pm's goal should basically be: be in PHP world what pm2 is in the node world.

@kugu
Copy link
Contributor

kugu commented Apr 13, 2016

Anyone working on it?)

@marcj
Copy link
Member Author

marcj commented Apr 13, 2016

I guess no. Willing to contribute? We could need a lot of stuff :)

@kugu
Copy link
Contributor

kugu commented Apr 13, 2016

Yeah, wanted to help. But no time to make it from the begining).

@kugu
Copy link
Contributor

kugu commented May 2, 2016

Actualy i'm not realy experienced in process managment.
I don't want study everything from a begining.
So, if someone could explain me basic things. What is the best way. What to read, where to look.
I could figure out and do it)
Main questions:

  • What is the best way to demonize php.
  • What is the best way to comunicate between processes.
  • What is the best way to handle with dead processes.

Best for me means fastest and durable.

@andig
Copy link
Contributor

andig commented May 2, 2016

Check processmanager.php for this implementation.

@bonndan
Copy link

bonndan commented Mar 17, 2017

What about using a message queue for life cycle management (just an idea)?

  • phpreact has some bindings for MQs
  • you could use a file watcher that sends "restart" events to the workers in development envs
  • workers could listen on "terminate" and handle shutdown themselves (might be more graceful)
  • a queue can be used for monitoring, too
  • zero downtime possible when workers taken out of round robin (althoug I'd prefer nginx to handle this)
  • if the queue is persistent a bit of resilience is added, too

The downside of course is more complexity and another animal in the zoo.

@alexpts
Copy link

alexpts commented Mar 10, 2018

Also will be great add/delete slave in runtime (scale up/down) via API PM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants