Search code examples
phpparallel-processingdistributed-system

move a running PHP instance from one server to another


Imagine a request comes to Nginx, then we process the request in PHP .... suddenly while execution of PHP is running, we don't have more resources in the server , so we need to process that PHP code on other server with more resources.

How can we "move" the complete PHP process to another server with more resources and then send back the result ?

this is like having a distributed php infrastructure, behaving in a dynamic way.

how can we achieve something like this?


Solution

  • At the moment I found out these 2 paths:

    CRIU https://criu.org/Main_Page

    MOSIX https://mosix.cs.huji.ac.il/txt_distributions.html

    or

    Dockerizing the app ... and move the docker container from one machine to another.

    (Applies the same to virtual machines)