Hook

—
Their other posts in the index, biggest breakout first.
If you're building an app, here's how I can tell if your APIs are set up wrong in 5 seconds. If I see anything like this retry logic that blindly sends requests and your backend is not ready for real-world conditions. Users, retry calls, calls can fail. This can lead to the same data being duplicated, which is not what you want. You need to learn about idempotency. In software, idempotency means that an operation produces the same outcome no matter how many times it is executed. If an action runs once or fifty times, the system state remains identical after the first successful attempt. Idempotency is an operation that produces the same outcome no matter how many times it is executed. So just make sure whenever you call your API, you send an idempotency key. This ensures that your data stays deduplicated. Notice on the first try here, it hits the database. On the retry, idempotency key found, so your database was never touched. You want to make sure first. If you want more tips like this, make sure to follow and like for more.