Purge framework expects that we set the rate limit on the purger level.

attached a patch that lets each zone set its rate limit. The sensible default depends on the outcome of #2878008: KeyCDN can only handle 128 characters of tags in a delete request. At the moment I'm assuming we can send up to 128 tags at a time for purging, and we know KeyCDN limits us to 20 request per minute. That means the rate limit per purger is (128 X 20 = 2560) / (number of keyCDN purgers on the same account). For now I put that calculation in the description, and set the default at 1000. That should be well over what most sites need.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ohthehugemanatee created an issue. See original summary.

ohthehugemanatee’s picture

FileSize
1.63 KB

Fix stupid use of settings->get

ohthehugemanatee’s picture

FileSize
1.97 KB

forgot to include the schema.

ohthehugemanatee’s picture

FileSize
1.08 KB

Heard back from support; it's a 128 character limit on the tags value. Including JSON, that means it can only handle 21 tags per request (see the other issue for the calculation). For a single-purger setup, that means a maximum of 420 tags in a single batch.

Attached an updated patch which counts the number of KeyCDN purgers and sets the max count based on that, rather than allow the user to configure it.

ohthehugemanatee’s picture

Waiting on commit until I know for sure - I've sent a followup request to KeyCDN support to confirm my understanding.

ohthehugemanatee’s picture

Status: Needs work » Fixed
FileSize
1.08 KB

Turns out we can get 32 tags per request in. Adjusting the patch and committing.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.