?
Solved

proxy caching

Posted on 2014-08-21
6
Medium Priority
?
177 Views
Last Modified: 2014-09-25
hi,

what are the configuration needs to be made in tomcat (7,8) server for enabling proxy caching?
0
Comment
Question by:Rocking
  • 2
4 Comments
 
LVL 13

Accepted Solution

by:
Rizzle earned 2000 total points
ID: 40277154
The simplest way, is to use a dedicated web cache provider. Tomcat does not have one OOTB, but you could employ Apache with mod_cache (and obviously mod_jk). In this configuration, Apache tends to act as a proxy-cache that caches the dynamic content served by Tomcat; you will have to ensure that Tomcat serves the right headers to ensure that Apache will cache the responses.

There are other commercial web-cache solutions, but they're typically used for high-end uses.

You could also employ Squid instead of Apache, to act as a reverse proxy that is also capable of serving cached content; in this case, Squid performs caching of the dynamic content.

If you do not wish to invest in an additional server, like the above solutions suggest, you might consider using EHCache to perform web page caching on Tomcat itself.
0
 

Author Comment

by:Rocking
ID: 40277956
how to configure the setting in apache with tomcat for proxy caching?
Let me know the steps for the above.
0
 
LVL 28

Expert Comment

by:dpearson
ID: 40282355
I'm not a sys-admin so I can't give you detailed advice, but in general for tools like Squid, the configuration you need to focus on happens in the proxy.  Tomcat generally doesn't need to be changed.

When a new request comes in it goes to Squid.  If Squid has a cached copy it responds with the cached version.  If not it forwards the request to Tomcat, which just responds exactly as if the request had come directly from the end user.

So you need to figure out how to install and configure whatever proxy you wish to use.
You might want to try "Squid in 5 mins":
http://magazine.redhat.com/2007/04/11/squid-in-5-minutes/

Also there are a lot of commercial solutions available for this - where the proxy/caching layer happens using another company's servers.  Some of the big players are Edgecast (http://www.edgecast.com/) and Akamai (www.akamai.com) or if you would like a cheap/free solution consider CloudFlare (https://www.cloudflare.com/).  If you use one of these, they handle all of the proxy servers and their configuration.  You just need to do some very simple setup (usually just creating some DNS entries) and each service has lots of docs or people to help walk you through it.

Doug
0
 

Author Comment

by:Rocking
ID: 40338172
I am unable to find enabling proxy caching in apache and tomcat?
Any link would be very much appreciated.
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question