I use http-kit as a web server as well. My deployment basically looks like this:
My main function starts my "app", once I have an app instance I attempt to start the http-kit server on a specific port. I do this in a loop, catching all socket already bound exceptions and retrying. Additionally I have an extra Thread watch a pid file to modifications. On modification the "old" app shuts down, releases the socket and the "new" app/http-kit binds it almost immediantly. It is not perfect but it usually means downtime of only a few milliseconds. I hope that was clear enough, basically just have currently running instance watch for a shutdown signal which it will get when another instance is ready to take over. It gets a bit tricky is you want to bind more than one socket, which I do for nrepl and want to do for JMX. I had mixed success with tcp SO_REUSEADDR. HTH, /thomas On Thursday, September 18, 2014 10:53:04 AM UTC+2, Ruslan Prokopchuk wrote: > > Community, how do you deploy clojure web applications? This question have > been asked several times, but I've not found answer to this particular > aspect: > what is the best way to deal with startup delay? > > I develop web application using http-kit and clojurescript. After deploy I > clean & rebuild clojurescript and rerun server. So, I have about half of > minute of downtime. > > I will be grateful for any advice. > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.