Back

Appwrite Cloud Delay from hosted in Frankfurt Germany to North America West (Utah)

  • 0
  • Web
  • Databases
  • Auth
  • Cloud
  • Functions
Nate
15 May, 2024, 21:22

So I was asked by @D5 to create this post, so it can be discussed further

Ive added the tags that correlate to my project and what i mostly use and where i see the delay being

Attached image is the point where i create a Email Password Session and based off the user information i will request additional information like the latest news posts for the website

In my previous message i left a statement where i would see 2.5 second delays for single GET request, and when it does more than 1 it takes 6 - 10 seconds, these are in my more heavier spots, but the login combined takes 6 secs based off a stop watch time.

I can add more data if needed

TL;DR
Developers are experiencing delays on the Appwrite Cloud when hosted in Frankfurt Germany and accessed from North America West (Utah). The slow performance is likely due to the use of multiple nested relationships in documents, which require additional database queries. Removing relationships can speed up the process. Using the `getDocument()` method instead of `listDocuments()` and reducing the number of relationships can help improve speed.
Steven
15 May, 2024, 21:25

according to the screenshot you shared, the create email session api call takes ~500ms 🧐

Steven
15 May, 2024, 21:26

the list documents is taking a while...

  1. can you use getDocument() instead of listDocuments()?
  2. do you have relationships?
Nate
15 May, 2024, 21:28

the documents use alot of relationships, im guessing your pointing that out, so it may be the culprit to my entire issue here?

Steven
15 May, 2024, 21:28

yes. lots of relationships can slow things down a lot

Nate
15 May, 2024, 21:29

Okay that also explains why things are alot faster when no relationships are used

Nate
15 May, 2024, 21:29

why are they so slow?

Steven
15 May, 2024, 21:35

For every document, for every relationship, Appwrite has to do an additional db query because the data needs to come back nested and permissions needs to be considered at the collection or document level

Steven
15 May, 2024, 21:36

And relationships go as far as 3 levels deep

Nate
15 May, 2024, 21:38

Ahh I see, so all that compounding just is pretty much unavoidable.

I'll work on removing relationships then in order to speed things up

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more