3 ms·
It can take up to 5 minutes to restart my application.
by tieTYT 12y ago
It can take up to 5 minutes to restart my application.
- einrealist 12y agoCan't you just break things up to see them in action? If not, you should question your architecture.
- Roboprog 12y agoSo run multiple instances of the app, and put some kind of load balancer / proxy in front of the instances. Unfortunately, this will require externalization of state data, but if you can't be down for 5 minutes, that's what you need to do. You probably only need one large server running the instances, rather than a cluster. Java apps don't seem to do well -- longer GC pauses -- when they have over 2 GB of memory, anyway, so run multiple instances of "small" apps on a server with say 12 cores. A single server with a large pool of RAM shared between a large number of cores can do pretty amazing things with a collection of "small" programs on it (DB, web service apps, message queue server, web servers) Of course, I'm assuming said server isn't Windows...
- winterbe 12y agoI don't think he meant hotswapping in productive environments but during development. Load balancing doesn't help here. The webapp I'm working on currently has a startup time of 50s on my macbook. If I restart the webapp 100 times a day, thats a total waiting time of 30+ minutes. Our team is 6 developers, so we loose 3h per day. Real hotswapping may be extremely complex but IMO it would be absolutely worth the effort.
- Roboprog 12y agoAh, gotcha. It's funny, I used to do very frequent tests like that when I worked in C (particularly the first few years in the language), but tend to do much fewer test runs in Java. Fewer fatalities, but longer build/start times, I guess.