[IMPLEMENTED] CDN: Add information to request logging

To investigate deeper what is going on here
we need more data on why caching is failing, like obj.ttl, obj.hits, CDN server-host and whether there was a HIT/MISS/ERROR. That data should be included in the log one can download on the Squidex dashboard.

@Sebastian just as a reminder for when you get to this: you can check our DMs regarding that topic for more details.

It has actually been implemented.

1 Like

@Sebastian Nice, many thanks! :pray:

However, currently all requests seem to MISS the cache and they all also have a TTL of 0. :thinking:

I have migrated the squidex website to use CDN. Then I can give you more details next week.

1 Like

I am planing to log all requests. Logging a request means that it will be charged.

So far only the cache HITS have been tracked at the CDN and have been invoiced with a factor of 0.5. But this leads to problems with traceability.

Therefore the plan is as followed:

Reduce the factor to 0.25 and log all requests

Before (no shielding, partial logging)

  1. CACHE MISS: Item not cached in edge server
    • Edge: 0
    • Backend: 1
  2. CACHE HIT: Item cached in edge server
    • Edge: 0
    • Backend: 1
      Total: 2

After

  1. CACHE MISS: Item not cached in edge server and shield server

    • Edge: 0.25
    • Shield: 0.25
    • Backend: 1
    • ==> Costs 2
  2. PARTIAL CACHE HIT: Item not cached in edge server, but in shield server

    • Edge: 0.25
    • Shield: 0.25
  3. Request (CACHE HIT): Item cached in edge server

    • Edge: 0.25

This means:

  • CACHE MISSES become more expensive.
  • CACHE HITS become less expensive

=> The higher the cache rate, the lower the costs.

1 Like

Sounds like a very reasonable approach, looking forward to it! :slight_smile:

This topic was automatically closed after 2 days. New replies are no longer allowed.