deploying web application on application server without web server
I have a web application that does not have much of static content and more of dynamically generated pages. Lets say I deploy it in weblogic. Why do I开发者_StackOverflow社区 still need a web server (IIS/Apache)? If I dont use a web server, what are the drawbacks?
Weblogic/Websphere aren't tuned to be standard HTTP serving platforms. Your performance will be quite sub-par compared to a dedicated web server. Web servers like IIS will cache static content in memory, allowing it to be served up very quickly and with little system overhead. There are some scenarios that Weblogic may do this, but a dedicated web server will be faster by far overall.
Additionally there may be security implications depending on your environment and needs, (if, say, AD authentication is in play) and URL related error handling is generally quite a bit smoother on a web platform. Configuring readable logging will be much simplified on a dedicated web platform as well. Then there are features a web platform will offer like host-header bindings, etc, but I'm guessing if you're serving a simple static site you're not overly concerned with those.
mmh, well if I understand your question correctly, you mention that you have very little static content. In my opinion, if you do not need any extra 'Web-Server' features, I see the use of an extra Web-Server as over complicated and more a performance drawback than an improvement. Having to turn over a Web-Server will introduce more network latency because you need extra connections between Web- and Application server.
A Web-Server may be useful if you have many concurrent requests and the most of them go on static content. It may also be useful for some security related constraints (you may put your application server behind a second firewall)
From my experience, if you do not really need the Web-Server, then do not use it, go straight to the App-Server and you have less troubles...
You actually don't need a web server at all. Going to production with WebLogic Server and no web server to offload static content is a perfectly viable choice.
The biggest issue with using WebLogic Server for both roles is that, if there's a large amount of static content, then you reduce your ability to scale your WebLogic environment to deal with a larger client base, because CPU/network I/O is being used to serve static content as well. WebLogic Server spends time serving static content, as well as rendering dynamic content.
There's definitely a security advantage to having a web server providing static content in a less secure network segment, and separating that via a firewall from your WebLogic instances.
The downside of introducing a dedicated web server is that you then need to manage another process (or set of processes) and ensure that your web server is just as highly available as your WebLogic Server instances.
I'd disagree with Toby Meyer's statement that a web server is going to be significantly more performant (although it's definitely worth a comparative performance test), or that your ability to configure error handling is smoother with a web server - with servlet filter chains and connection filters alone, you get some pretty powerful capabilities with WebLogic Server, albeit ones you'll need to code for. And if you use custom HTTP headers, you can actually get far more flexible and powerful HTTP logging.
To summarise, I'd see the drawbacks of not using a web server as: - increased load on WebLogic environment - unable to put static content in less secure network segment, separate from WebLogic Server instances
精彩评论