From ab80374995ce92f7c607ae3a6e565213cb41e944 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=A2=E5=85=8B?= Date: Mon, 25 Mar 2013 16:31:54 +0800 Subject: [PATCH] - --- _posts/2013/2013-03-25-web.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/_posts/2013/2013-03-25-web.md b/_posts/2013/2013-03-25-web.md index c762e62..c447fee 100644 --- a/_posts/2013/2013-03-25-web.md +++ b/_posts/2013/2013-03-25-web.md @@ -94,11 +94,22 @@ WSGI Family > [Web Server Interfaces](http://en.wikipedia.org/wiki/Template:Web_server_interfaces) -而至于Java语言,其用于Web开发的标准为Servlet。 - +而至于Java语言,其用于Web开发的标准为Servlet。目前Servelet已经发展到3.0版。 +
常用的网站部署方式 前端web server 比如Apache,nginx,lighttpd,HAproxy用来直接处理用户的请求以及给用户响应,如果是静态文件的请求,那么web server直接给用户静态文件,毕竟前端的web server一般都是c语言写的,效率较好。 而动态的部分,则由 web server转至后端的 app server进行处理,传送的方式可以是cgi,fastcgi,ajp,或者直接反向代理。 +像Apache或者Nginx都可以通过一定的方式支持FastCGI。 +比如一下方式可以作为某个Python Web App的部署方式: + + Nginx/FastCGI <----FastCGI----> FastCGI/WSGI Server + +还有一种方式就是前端的Web Server只负责请求的转发,也就是反向代理的方式,后端的Web App Server本身就集成了Web Server的功能: + + Nginx<----反向代理---->Web App Server Instance1 + ^ + |----反向代理---->Web App Server Instance2 +
####四.Web Application 应用开发