DataStore max data

i’m making a game and i plan on using datastore modules to save data, and apparently there’s a maximum datasize. is this talking about the maximum datasize for each key, or is there a maximum datasize for each game

1 Like

Maximum Key Size is 50 Characters
Maximum Data Size is 4,000,000 Characters per entry
I’m not sure but I don’t think there is a limit on how many entries you can have per datastore.

is a character each letter in a string because 4 million sounds like a small amount for what bigger games that have had 2 million people playing at a time

Yes, a character represents a single letter/number/symbol etc. It doesn’t matter the size of the player base since I don’t think your limited by datastore entries (e.g. 1 player=1 entry). As long as each player entry is less than 4Million Characters each.

The official documentation page for DataStores has a section on limitations.

A single key can be 50 characters long, a single value associated with that key can be 4 million characters in length, don’t forget that you can have multiple key/value pairs for each player in a single DataStore.

will i even have to worry about any of this if i just use a datastore module

I highly doubt you’re going to exceed 4 million characters in a single value. For context there are 3,116,480 letters in the Bible.

1 Like

:point_up_2:

For the sake of reference, I have a production-level experience I develop with a team called PWNED 3. This has a decent amount of traffic and lots of player data logged. Right now we’re barely surpassing or even meeting the old 256KB limit (every now and again when I do data debugging my capacity checks never exceed 1% consumption even from the top 0.1% of players).

DataStore module or not the vast majority of experiences on the platform will never have to worry about the limit because they simply won’t reach it. Their experience demands are not large enough that they have to store excessive amounts of data, it’ll mostly be simple key-value pairs and a few tables here and there as descriptors for more involved features. DataStore modules just provide you abstraction anyhow and wouldn’t necessarily affect your budget consumption.

For more advanced developers with larger experience demands (e.g. massive inventory, free build games, user generated educational content like Lua Learning) they may experience a need to split across several DataStores to fully store their content. There’s a very small number of developers and types of experiences where exceeding 4MB is a genuine concern.

4 Likes