servicebroker icon indicating copy to clipboard operation
servicebroker copied to clipboard

Enable a more efficient polling of catalog

Open duglin opened this issue 7 years ago • 10 comments

What do people think about supporting an ETag type of mechanism for /v2/catalog so that a broker can return "304 Not Modified" if nothing has changed since the last time the Platform queried the catalog? It would save the broker the time of regenerating the result, and it will save the platform the time of diff'ing it.

duglin avatar Jun 14 '18 04:06 duglin

Most of our brokers use a static catalog, so it is not an issue on the broker side.

It would be nice if a broker could specify the period when the platform should refresh the catalog, e.g. via Cache-Control: max-age=... response header. Then different brokers might use different intervals.

dotchev avatar Jun 14 '18 20:06 dotchev

@mattmcneeney was this discussed during the call this week? Any feedback?

duglin avatar Jun 19 '18 19:06 duglin

I'm not sure what an etag is exactly, but I agree with the goal described here

On Tue, Jun 19, 2018 at 3:49 PM, Doug Davis [email protected] wrote:

@mattmcneeney https://github.com/mattmcneeney was this discussed during the call this week? Any feedback?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/openservicebrokerapi/servicebroker/issues/529#issuecomment-398523117, or mute the thread https://github.com/notifications/unsubscribe-auth/AAWXmDdKSeEYnprp7BrTOg5pIEa8ib_Iks5t-VXjgaJpZM4UnTXu .

pmorie avatar Jun 19 '18 20:06 pmorie

@pmorie https://en.wikipedia.org/wiki/HTTP_ETag

duglin avatar Jun 19 '18 20:06 duglin

@duglin This was discussed briefly though we had low attendance on yesterday's call. @fmui mentioned that since ETags are just part of the HTTP spec, why do we have to add something to the spec? (I think - correct me if I'm wrong Florian!)

mattmcneeney avatar Jun 20 '18 08:06 mattmcneeney

While true its part of the HTTP spec, given not everyone knows about it (as shown by Paul's comment), I suspect that unless we call it out people will not consider supporting this optional feature. So, a PR on this wouldn't require people to use it, but rather make people aware of it and explain any implications of its use. I know that some uses of OSBAPI will ping the catalog quite often, so I think highlighting this to help performance would be nice.

duglin avatar Jun 20 '18 19:06 duglin

@jberkhahn is this still something that may be of use to the svc-cat community?

mattmcneeney avatar Jun 24 '19 13:06 mattmcneeney

sure

jberkhahn avatar Jun 25 '19 03:06 jberkhahn

@jberkhahn Cool - do you want to own opening the PR for this one? :)

mattmcneeney avatar Jun 25 '19 08:06 mattmcneeney

i'll try to get around to it this week

jberkhahn avatar Jul 01 '19 20:07 jberkhahn