Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Users

Caching webservice calls using apache

 

 

Apache users RSS feed   Index | Next | Previous | View Threaded


aparnapuram at gmail

Apr 10, 2012, 1:31 AM

Post #1 of 3 (293 views)
Permalink
Caching webservice calls using apache

Hello All,

Can we cache webservice calls using Apache.

Currently we have only a tomcat installed and all are directly accessing
the tomcat via apache, And all the webserivice calls are directly being
called from tomcat and this inturn is increasing the load on the tomcat
server.

Is there a way to cache these websercice calls using apache.

If so kindly provide me the details or please let me know the reasons for
not being cached.

Thanks a lot in advance.


mark at catseye

Apr 10, 2012, 5:26 AM

Post #2 of 3 (281 views)
Permalink
Re: Caching webservice calls using apache [In reply to]

On April 10, 2012 4:31 , aparna Puram <aparnapuram [at] gmail> wrote:
> Currently we have only a tomcat installed and all are directly
> accessing the tomcat via apache, And all the webserivice calls are
> directly being called from tomcat and this inturn is increasing the
> load on the tomcat server.
>
> Is there a way to cache these websercice calls using apache.
>
> If so kindly provide me the details or please let me know the reasons
> for not being cached.

Apache HTTP Server can certainly cache content, see
https://httpd.apache.org/docs/2.4/caching.html Be sure to read the
sections "What Can be Cached?" and "What Should not be Cached?"

However, caching for a web service call only makes sense if the call
will always return the same output for a given set of
arguments/parameters and the call does not have any side effects. For
example, it would be safe to cache the results of call for "return a
thumbnail of the image a.png" but it would not be safe to cache the
results of a call for "add a new description for part number 12345".

Also note that web service calls using the HTTP POST method may be
difficult or impossible to cache.

Often, caching is used only for static content, as it can be tricky --
or inappropriate -- to correctly set up caching for dynamically
generated content.

Instead of caching web service calls, you may want to analyze how Tomcat
is spending its time and see if the code of your web application can be
made more efficient.

--
Mark Montague
mark [at] catseye


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd


aparnapuram at gmail

Apr 10, 2012, 6:26 AM

Post #3 of 3 (279 views)
Permalink
Re: Caching webservice calls using apache [In reply to]

Thanks a lot Mark

I will check with the applicaiton once and come back to you on this.

On Tue, Apr 10, 2012 at 5:56 PM, Mark Montague <mark [at] catseye> wrote:

> On April 10, 2012 4:31 , aparna Puram <aparnapuram [at] gmail> wrote:
>
>> Currently we have only a tomcat installed and all are directly accessing
>> the tomcat via apache, And all the webserivice calls are directly being
>> called from tomcat and this inturn is increasing the load on the tomcat
>> server.
>>
>> Is there a way to cache these websercice calls using apache.
>>
>> If so kindly provide me the details or please let me know the reasons for
>> not being cached.
>>
>
> Apache HTTP Server can certainly cache content, see
> https://httpd.apache.org/docs/**2.4/caching.html<https://httpd.apache.org/docs/2.4/caching.html> Be sure to read the sections "What Can be Cached?" and "What Should not
> be Cached?"
>
> However, caching for a web service call only makes sense if the call will
> always return the same output for a given set of arguments/parameters and
> the call does not have any side effects. For example, it would be safe to
> cache the results of call for "return a thumbnail of the image a.png" but
> it would not be safe to cache the results of a call for "add a new
> description for part number 12345".
>
> Also note that web service calls using the HTTP POST method may be
> difficult or impossible to cache.
>
> Often, caching is used only for static content, as it can be tricky -- or
> inappropriate -- to correctly set up caching for dynamically generated
> content.
>
> Instead of caching web service calls, you may want to analyze how Tomcat
> is spending its time and see if the code of your web application can be
> made more efficient.
>
> --
> Mark Montague
> mark [at] catseye
>
>

Apache users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.