Women in Technology

Hear us Roar



Article:
  Two Servlet Filters Every Web Application Should Have
Subject:   reverse proxy
Date:   2003-11-20 01:33:02
From:   anonymous2
If you need caching, isn't it better to set up another box to act as a web cache?
Then your servelet container doesn't have to take the hits for images etc.


Apache is very fast indeed when used as a proxy. This way you are using a single standard component, in the way HTTP is designed for, and getting a big performance improvement with very little complication in the application - just the need to think about what expiry time to indicate for each resource.


If you need to scale further, this configuration plays nice with mod_sesssion too.

Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • reverse proxy
    2003-11-21 08:22:12  anonymous2 [View]

    Yes and No. Read the comments I made on the pervious comment, the same arguments almost directly apply to this.

    In short, caching using another box is really great for raw speed -- arguably the best solution if that is what you need. However, most people simply don't need this much speed, and keeping the ease/flexibility that the filters I presented offer is arguably the best general solution.

    Consider also that the code I presented doesn't by default hurt your ability to scale later. These two filters are transparent to the web app. What do you lose by using them until you need to have a dedicated box for caching, and then how tough is it to turn these filters off and turn your cache box on?

    Cheers,
    Jayson Falkner
    jayson@jspinsider.com