isamplesorg / isamples_inabox

Provides functionality intermediate to a collection and central
0 stars 1 forks source link

make analytics messages non-blocking #321

Closed datadavev closed 7 months ago

datadavev commented 8 months ago

When diagnosing slow response on hyde after migration from aws the responsiveness of calls like /things/select was very slow although solr was fast. The problem was a blocking call to the metrics service which needed to time out before continuing.

The metrics calls should be non-blocking. We can probably use the fastapi BackgroundTask for this, and probably add it as middleware so it is automatically part of all method calls.

dannymandel commented 7 months ago

This was fixed with https://github.com/isamplesorg/isamples_inabox/pull/330