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

Mailing List Archive: Varnish: Misc

Should I Use Varnish for RESTful API

 

 

Varnish misc RSS feed   Index | Next | Previous | View Threaded


smsmail at roadrunner

Sep 4, 2012, 12:08 PM

Post #1 of 2 (176 views)
Permalink
Should I Use Varnish for RESTful API

I have a server running Ubuntu, Apache2, Drupal 7, Varnish. I have a PHP RESTful API that I run on this computer that takes search requests from the API request and then returns the data from the drupal database in a JSON format and shortly will be returning XML and HTML if requested. Right now I have varnish setup to pass on the API requests, should I let varnish cache the data? Currently the search terms are pretty small and the returned data is in the hundreds of records, hopefully soon the number of records in the database will jump alot and the search terms and returned data will jump to large number of records.

_______________________________________________
varnish-misc mailing list
varnish-misc [at] varnish-cache
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc


perbu at varnish-software

Sep 5, 2012, 12:12 AM

Post #2 of 2 (165 views)
Permalink
Re: Should I Use Varnish for RESTful API [In reply to]

Hi Mark,

On Tue, Sep 4, 2012 at 9:08 PM, <smsmail [at] roadrunner> wrote:

> I have a server running Ubuntu, Apache2, Drupal 7, Varnish. I have a PHP
> RESTful API that I run on this computer that takes search requests from the
> API request and then returns the data from the drupal database in a JSON
> format and shortly will be returning XML and HTML if requested. Right now
> I have varnish setup to pass on the API requests, should I let varnish
> cache the data?


Yes.

You need to make sure that they are GET requests, though.

--
Per Buer
Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / Skype: per.buer
*Varnish makes websites fly!*
Whitepapers <http://www.varnish-software.com/whitepapers> |
Video<http://www.youtube.com/watch?v=x7t2Sp174eI> |
Twitter <https://twitter.com/varnishsoftware>

Varnish misc 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.