Technology restrictions

Edit on GitHub

Some actions, parts of the website, or the entire website are slow.

Cause

A possible cause is technology restriction.

Solution

Before using some technology, you need to understand all its advantages and disadvantages.

A good example is Redis. It is fast, but if used incorrectly, it can lead to performance degradation. If we search against * or Wildkey in Redis with a large DB, we get the following results:

NewRelic—DB:

new-relic-db

NewRelic—Breakdown:

new-relic-breakdown

As you can see, the Redis keys take most of the time. Therefore, they need optimization. You can optimize them by updating your functionality to use exact keys instead of *.

In the code, this would look similar to this line:

$this->storageClient->getKeys(self::RESOURCE . ':*');