How can i have hot redeploy in production mode in play framework 2 apps?

470 Views Asked by At

I know that play framework 2 support hot code reloading in development mode, I want to know how can i have hot redeploy in production mode in play framework 2 apps? Is there a transparent approach to do this? something like using load balancer or native approach is acceptable to me.

2

There are 2 best solutions below

0
On

Load balancing is a natural choice with play because of it's stateless nature. You can deploy on one instance at a time, and your application will remain available all the time as long as the other instances are UP.

Once the application deployed put it back to the load balancer and end users will not notice any outage

0
On

It is to late to answer this, but using remote debugger you can hot swap java classes

$ jdb -attach 192.168.2.241:9999
> redefine com.ClassName /path/to/project/target/scala-2.12/classes/com/ClassName.class