Skip to content
This repository has been archived by the owner on Aug 28, 2023. It is now read-only.

Add GW version of the /owners/{address}/safes/ endpoint #529

Closed
jpalvarezl opened this issue Jul 30, 2021 · 8 comments · Fixed by #580
Closed

Add GW version of the /owners/{address}/safes/ endpoint #529

jpalvarezl opened this issue Jul 30, 2021 · 8 comments · Fixed by #580
Assignees

Comments

@jpalvarezl
Copy link
Contributor

jpalvarezl commented Jul 30, 2021

Context

The /owners/{address}/safes/ endpoint is directly queried by the web app is an endpoint known to be problematic due to the heavy load it puts on the database.

Feature

Create a cached endpoint with backend/service models decoupled from each other under

GET /v1/chains/<chain_id>/owners/<address>/safes

Open questions

What webhook payload invalidates this endpoint in case of changes?

We don't have one, we cache for 1 minute

@rmeissner
Copy link
Member

How is this issue related to #449

@jpalvarezl
Copy link
Contributor Author

In its conception it was not. This issue is just a reaction to the service outage. This endpoint was reported to be used directly from the core services and it is also very heavy on the resource side of things. We are just trying to mitigate the load by providing this and heavily cache it.

@rmeissner
Copy link
Member

If this endpoint causes issues we should remove it on the core production services (or rate limit it or prevent external traffic) as it is not used by any of our production interfaces

@jpalvarezl
Copy link
Contributor Author

I've moved this back to review spec so we can maybe include the fields requested by Ivan and address the open questions.

@katspaugh
Copy link
Member

If this endpoint causes issues we should remove it on the core production services (or rate limit it or prevent external traffic) as it is not used by any of our production interfaces

This endpoint is now used in the web UI (in the sidebar). So it'd be nice to keep it/cache it.

@rmeissner
Copy link
Member

Only for staging or also in production?

@katspaugh
Copy link
Member

katspaugh commented Aug 3, 2021

In prod as well. Since v3.10.0.
Screenshot 2021-08-03 at 17 05 33

Is it killing the service? Should we roll it back?

@katspaugh
Copy link
Member

Frontend ticket: safe-global/safe-gateway-typescript-sdk#12

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants