language agnostic - Deployment of static content -


i have design decision deployment here requirement

  1. there web server , app-server(jboss 5.1)
  2. application dinamic content should there in app server
  3. web server should contain static content html, pdf, images etc. (as per client)

my questions:

  • first of correct approach ?
  • we have app server why need webserver?
  • if use web server hide app server why need put static content web server?

thanks in advance

amit

at small enough scale, doesn't matter. if workload few dozen employees using internal web service doesn't require lot of resources per request, whatever can deploy quickly. might mean serving static content through handler in web-app, on single server.

when start scale up, things didn't matter before become noticeable.

the first thing becomes noticeable on above configuration (static content handled web-app) pages take lot longer load. that's because 1 part of page dynamic, html itself, images, javascript, css, , whatever other odds , ends page includes following same lifecycle.

one thing can improve things serve static content intelligently in handler take advantage of caches , proxy servers, setting expires , etag headers, , returning 304 not modified when appropriate.

but that's static web server already. plus static web server can better optimized @ specific workload. when start scale up, shifting workload host, app server never sees it, 1 of easiest ways extract more performance web-app little cost.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -