<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  
</head>
<body text="#000000" bgcolor="#ffffff">
I used to work at BEA, on WebLogic Server, which our customers<br>
used to implement advanced (by the standards of the time)<br>
web sites.  All of them used this strategy, namely have a<br>
basic HTTP server which would serve up the static content,<br>
and pass through the interesting stuff to the WebLogic<br>
Server process.<br>
<br>
On the other hand, patching Lisp dynamically is not the only<br>
way to be able to do hot upgrade.  Here at ITA, we do not<br>
patch running Lisp processes; it's just too fraught with<br>
intermediate states that are hard to have Q/A'ed in<br>
advance.  Fortunately for us, we never run just one<br>
server; we always use a cluster of servers with a load<br>
balancer.  So we do a "rolling upgrade", where we<br>
bring down each server and then bring up the new<br>
version of the server, one machine at a time.  Or,<br>
we bring down half, upgrade those, and then switch<br>
to the other half.<br>
<br>
The issue you then must cope with is sessions with<br>
many requests, some of which go to old-version servers<br>
and some to new.  (Even with code patching, there<br>
are such windows.)  The latter approach (halves)<br>
means you only have to worry about a session<br>
first seeing one of many old-version servers, followed<br>
by one or many new version servers, which can<br>
make things easier to reason about, but then<br>
you jhave to make sure that only 1/2 of your<br>
servers can handle the load.  If you have<br>
a mostly-diurnal load, you can do this "at night",<br>
if your load goes down to < .5 or whatever.<br>
<br>
The point is that the new version can be Q/A'ed<br>
intensively before you do this and you don't<br>
have to worry about things like "I updated<br>
function X, but some existing thread has<br>
an existing stack frame with the PC at the<br>
old version of X" and such.<br>
<br>
-- Dan<br>
<br>
<br>
<br>
<br>
<br>
Shaneal Manek wrote:
<blockquote type="cite" cite="mid:AANLkTinx+9gHi71hO5rD8LuGOzbevdGBi9NtqEBgFgVw@mail.gmail.com">
  <pre wrap="">Generally, I deploy Hunchentoot behind a reverse proxy (just nginx for
single-instance deployments, or HAProxy and nginx for more complex
setups).

In either case, I let nginx serve the static content (no need to waste
the relatively expensive Lisp threads for serving images). In the
single-hunchentoot case, nginx can serve a static error page when the
hunchentoot instance is down. On the other hand, if you have a HAProxy
in front of multiple hunchentoots, then as long as one hunchentoot is
still up your site can continue with no downtime.

-Shaneal

On Fri, Sep 17, 2010 at 1:08 AM, Ron Garret <a href="mailto:ron@flownet.com" class="moz-txt-link-rfc2396E"><ron@flownet.com></a> wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">I'm getting close to deploying CCL on a production server, which has forced me to reluctantly reach the following conclusion: the fact that Lisp allows code to be changed dynamically means that unless you are extremely disciplined about how you patch the code in your server, it is not at all difficult to end up in a situation where the server needs to be restarted.  When that happens, it would be nice not to have the server machine go completely dead, but instead to respond with a nice "Server temporarily unavailable" page, and maybe even continue to serve static content.  So much as I'm a fan of Lisp and Hunchentoot, it seems to me that it's not a good idea to use that combination as the front-end of a production application, but instead to deploy the Lisp app as a FastCGI or the back-end of a proxy server setup.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
_______________________________________________
tbnl-devel site list
<a href="mailto:tbnl-devel@common-lisp.net" class="moz-txt-link-abbreviated">tbnl-devel@common-lisp.net</a>
<a href="http://common-lisp.net/mailman/listinfo/tbnl-devel" class="moz-txt-link-freetext">http://common-lisp.net/mailman/listinfo/tbnl-devel</a></pre>
</blockquote>
</body>
</html>