I serve static content from Tomcat. Someone suggested moving the static content to a web server in order to optimize performance. How are web servers designed that makes them better at delivering static content?

  • 3
    This is Too Broad, and we don't do troubleshooting here. You need to describe your problem more specifically, and ask your question on the correct site, deleting your post from here. Each site has a Help Center that can help you decide which site to post it on. Commented Oct 14, 2016 at 0:26
  • While I agree with Robert Harvey's comment above, this question is (perhaps far) too broad in it's current form, I thought I'd give you some pointers about how to rephrase it. 1) Webservers, came from fileservers, so think of an FTP server, or similar. 2) Application servers, like the custom TCP/IP things banks have been using since the 80's, or the many ANSI/modem based things before it, are more specialised (and their owners have historically tended to have deeper pockets). 3) Performance != simplicity. ;) Commented Oct 17, 2016 at 13:05

1 Answer 1


Servers which are able to serve dynamic content may sometimes not be suited for static content. They may have an additional performance penalty because requests may have to pass through the parts which decide which handler should take care of the request, how the request should be filtered to check if the user has the rights to access the resource, what additional actions such as compression should be applied to the response, etc.

Therefore, servers which either have fewer features or were configured specifically to serve static content only may provide a slightly better performance.

This being said, servers such as Apache or IIS are very capable to serve both dynamic and static content at the same time very fast, so unless you have actually measured the difference and you actually serve thousands of requests per second, you shouldn't care too much. Much more important, for instance, is the way you configured client-side caching of your static content.

A CDN, however, is generally a good idea, even for medium-sized websites (i.e. a few dozens to a few hundreds of requests per second.) In the same way, static content is often put on a different server not for performance reasons, but simply because of the lower cost (compare for instance the cost of Amazon's CloudFront with Amazon AWS instances.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.