Re:Building With Workers KV, a Fast Distributed Key-Value Store
by kentonv on Friday September 28, 2018 @09:51AM
(#18093307)
> What happens when I write to the same key simultaneously from multiple workers and/or multiple edge nodes?
It's eventually-consistent. Eventually, one of the writes "wins".
If you do a read/modify/write in the context of processing a single request from a Worker, we'll automatically apply optimistic concurrency so that the write fails if another write has occurred on the same key concurrently.
But otherwise, yes, the ability to handle transactions is limited. For now, Workers KV can be used for a variety of use cases but is not a full replacement for a database.
Workers KV is only the first of multiple storage-related projects we're working on. Stay tuned. :)
It's eventually-consistent. Eventually, one of the writes "wins".
If you do a read/modify/write in the context of processing a single request from a Worker, we'll automatically apply optimistic concurrency so that the write fails if another write has occurred on the same key concurrently.
But otherwise, yes, the ability to handle transactions is limited. For now, Workers KV can be used for a variety of use cases but is not a full replacement for a database.
Workers KV is only the first of multiple storage-related projects we're working on. Stay tuned. :)