kb+varnish at slide.com
Fri Nov 6 20:21:14 CET 2009
I agree with Rtsh: the sole intent of POST is to write data, and there
is simply no reason to use a POST in any other circumstance. I doubt
you'd find any out-of-the-box caching system that doesn't simply short-
circuit POSTs (I've never seen one that doesn't).
Christian Kratzer, if by "webservices" you mean the prototypical
Web2.0/AJAX POSTs, these cannot be cached -- it's a POST for a
reason. If it's a POST for no reason, then the web developer needs an
HTTP refresher. :) :)
An HTTP/POST interface to a database is a poor choice from both a
query performance and an HTTP interoperability standpoint -- the worst
of both worlds. The "right" solution would probably involve the
database server (that handles the HTTP/POST) implementing a simple
query cache, maybe with memcached. Or perhaps on your front-ends in
the spirit of a PHP/memcached/MySQL setup.
I'm not sure I can think of an easy option for you, other than hand-
patching Varnish. :(
On Nov 6, 2009, at 7:57 AM, Christian Kratzer wrote:
> On Fri, 6 Nov 2009, rtshilston at gmail.com wrote:
>> I thoroughly disagree with this use of HTTP. If a request makes an
>> impact on a system, then it should use POST (eg login, pay,
>> delete). However, if it has no write-behaviour (other than,
>> perhaps, logging) then it must be GET.
> This kind of behaviour seems quite frequent in the context of
> webservices which are often POST only.
> This is of course not the classic use case of varnish between client
> browsers and webservers.
> Christian Kratzer
> CK Software GmbH
>> If you follow this, then varnish will work fine.
>> Can you explain more about your actions? If you're using a
>> processing server to build reports then GET should be fine.
>> -- Sent from my Palm Pr?
>> Rob Ayres wrote:
>> 2009/11/6 Tollef Fog Heen <tfheen at redpill-linpro.com>
>> ]] Rob Ayres
>> | I want to cache POSTs but can't get varnish to do it, is it
>> possible? If it
>> | makes it any easier, all requests through this cache will be of
>> POST type.
>> No, you can't cache POSTs. It doesn't make any sense to do so.
>> We have a processing server and a database server. The processing
>> server makes its requests to the database server by means of a
>> POST. There is enough duplication in the POST requests to have made
>> it worth having a caching server between the two.
> Christian Kratzer CK Software GmbH
> Email: ck at cksoft.de Schwarzwaldstr. 31
> Phone: +49 7452 889 135 D-71131 Jettingen
> Fax: +49 7452 889 136 HRB 245288, Amtsgericht
> Web: http://www.cksoft.de/ Geschaeftsfuehrer: Christian
> varnish-misc mailing list
> varnish-misc at projects.linpro.no
More information about the varnish-misc