Multiple scripts upserting simultaneously

I’ve got a script which upserts a bunch of vectors one by one to an index. This works fine when running on its own, inside a GCP cloud function. I’ve noticed that if I have this script running, and call it again via another instance, the original instance fails. Are there any limitations around upserting from multiple scripts simultaneously, on the same API key + index?

There is a rate limit for upserting data and running the function on multiple clients will 100% hit a rate limit depending on your volume. Instead of doing inserts “one by one” you should really try to maximize upsert requests by batching them together in a single query. I belive you can upsert up to 500 at a time (depending on your POST request size).