Skip to content

Thoughts for a sharding counter in a "stressed environment" #107

@trollkotze

Description

@trollkotze

I had problems implementing a sharding counter in Datastore that would work under stress. When there was a lot of traffic (syncing huge amounts of data) with many entity update and insert calls being started at once, and sharding counter increments inside transactions added for each insert, the network was too congested to get done with any increment within 60 seconds (the maximum time for a transaction).

The thing is, Datastore has no problems with long running update commands, as long as they are not inside a transaction. It can take much longer here to get done with an update than 60 seconds when there are dozens started at once and the network is congested. Datastore will keep connections for every command alive for quite long and succeed even after many minutes. But for transactions this is of course not allowed.

I think a sharding counter would be a great feature for this package, but it might not be so easy to make it usable and robust even in a "handicapped" or "stressed" environment like this.

Just some food for thought to work on maybe when there is time. If I come up with experience and ideas, I'll try to get back here as well.

Cheers!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions