Natan Silnitsky
1 min readJun 22, 2021

--

Hi,

Thank you for your questions, I appreciate every question I get.

The purger service works as follows:

1. consumes the invalidation event

2. produces X purge Kafka events, each for a single varnish instance url (where X is number of varnishe instances)

3. consumes purge kafka event and purges that varnish instance.

The particular varnish instance may not have the specific site to purge, there is no way to know which one has what.

regarding using this approach for rest api data,

It's possible as long as you make sure that:

1. the GET request has all params relevant to get the same response on each call.

2. you use all identifying parameteres in your invalidation request.

But it's more difficult to make sure these requirements are kept throughout the lifetime of the service, so it's not widely used. that where the other patterns I mentioned in the post have more value.

--

--

Natan Silnitsky
Natan Silnitsky

Written by Natan Silnitsky

Backend Infrastructure Team Lead @Wix.com

No responses yet