Who owns a block, who owns a player, and what stops two servers both believing they do
Atlas cuts your world into squares. Each square is run by one Paper server, and only that server is allowed to change anything inside it.That single rule is the whole design. Everything else on this page exists to keep it true while players walk around.
Your world, cut into squares
Out of the box Atlas makes four squares of 2048 x 2048 blocks, arranged 2 across and 2 down, centred on the world origin.
The default grid. x increases to the east, z increases to the south. Each square is one Paper server.
Regions are numbered left to right, then top to bottom, starting at the north-west corner:
Region
Runs on
Covers x
Covers z
0
world-r0
-2048 to 0
-2048 to 0
1
world-r1
0 to 2048
-2048 to 0
2
world-r2
-2048 to 0
0 to 2048
3
world-r3
0 to 2048
0 to 2048
A block sitting exactly on a border line belongs to one region and never to both. The square starting at a line owns it, which is why spawn at 0,0 belongs to region 3 and not to region 0.
There is nothing magic about the region numbers. They are just the order the squares are counted in, and they are what you put in each server’s shard.region setting.
The three numbers you choose
region-size
How many blocks wide each square is. Default 2048. Minimum 256, and a multiple of 16.
regions-x
How many squares across. Default 2.
regions-z
How many squares down. Default 2.
Multiply them and you get two things at once: how many servers you need, and how big your world is.
servers = regions-x x regions-z
world width = regions-x x region-sizeworld depth = regions-z x region-size
Some setups that people actually run:
Shards
regions-x
regions-z
region-size
World covered
Good for
2
2
1
2048
4096 x 2048
The smallest real test
4
2
2
2048
4096 x 4096
The default. A normal SMP
4
4
1
1024
4096 x 1024
A long east-west map
9
3
3
2048
6144 x 6144
A big survival world
Bigger squares mean fewer borders and fewer crossings, so fewer moving parts. Smaller squares spread load more evenly but put players near a line more often. If you are unsure, leave all three alone.
The edge of the map
Outside the grid, nobody owns anything, so nothing may happen there. Players who reach the outer edge are pushed back inside, and entities that wander out are removed. You do not need a vanilla world border to make this work, though setting one to match keeps players from bumping into an invisible wall with no explanation.
What happens near a border
A border is not a wall and not a loading screen. For a strip of blocks either side of every line, each server shows you what is happening on the other side.
Looking down on a single border. Not to scale - the band is 64 blocks out of a 2048 block square.
Two measurements drive this, and neither is something you set directly:
How close you are to your own square’s edge decides when the neighbour is warmed up in advance, and which of your blocks are worth copying over.
How close you are to the neighbour’s square decides whether you show up as a ghost on their side.
The band is tuning.ghost-width, 64 blocks by default. It can never be wider than a quarter of a region, because two bands of the same square would overlap and a server would start copying its own copies. Atlas refuses to start rather than let that happen. The details are in Ghosts and blocks.
Two things are owned, in two different ways
Ground never moves
Which server owns a block is pure arithmetic on its coordinates. Every server and every proxy works it out independently and always gets the same answer. Nothing is looked up, so nothing can go stale or disagree.
Players move constantly
A player cannot be owned by arithmetic, because they walk. Instead each player has one ticket in the database saying which server holds them right now, and handing the ticket over is a single, indivisible step.
The ticket, in plain terms
Think of it as a numbered baton. There is exactly one per player, and the number goes up by one every time it changes hands.
Ownership of a player over time. The two servers touch but never overlap.
Four rules make that safe. None of them need anything special from your database.
1
Only the holder may save, and only with the current number
Every save says “I am server A and I hold ticket 7”. If the ticket has moved on to 8, the save matches nothing and is thrown away. A server that lagged out and came back cannot overwrite what happened while it was gone.
2
Handing over is one indivisible step
Saving the player’s state, changing the holder and bumping the number all happen in the same single write. There is no instant where the inventory says one thing and the ownership says another.
3
A crashed server loses its grip on its own
The holder has to keep renewing the ticket. A server that dies stops renewing, and after 30 seconds someone else may pick the player up. If the dead server wakes up later, its number is out of date and it is locked out.
4
A handoff can be undone, but only before it lands
If the other side never answers, the first server can take the player back. That undo only works while the number is still exactly what the handoff produced. Once the target has actually claimed the player, the number has moved and the undo fails, so two servers can never both conclude they hold the same person.
Before you change any of this
The grid must be identical on every shard and every proxy. A single server with a different region-size will route players to a shard that does not own where they are standing, and nothing will detect it for you. Leaving all three settings unset, so everyone takes the same defaults, is the safest way to keep them in step.
Changing the grid later is a full network restart, not a rolling one. Resizing the squares changes which region a standing player belongs to, so every shard and proxy has to come back with the new numbers together.
Under the hood
The exact behaviour, for when you need to verify something rather than understand it.
The arithmetic
The grid is centred on the origin, so borders fall on multiples of the region size.
Region i covers a half-open square [minX, maxX) by [minZ, maxZ), so a block on a border line belongs to exactly one region. Numbering is row-major from the north-west corner:
x=0 x=1 z=0 [ 0 ][ 1 ] z=1 [ 2 ][ 3 ]
Outside the grid the region index is reported as -1. The grid is derived from config and never from Redis, so a topology outage cannot change who owns what.
The two distances
The distance from a point to its own region’s nearest edge decides when to warm up a neighbour and which blocks are worth mirroring. The distance from a point to another region’s rectangle, zero inside it, decides whether something belongs in that neighbour’s ghost band.The ghost band must be no wider than a quarter of a region, or opposite bands of the same region overlap and a shard starts mirroring its own mirrored blocks. The configuration refuses to start otherwise.
The fenced lease document
A player is one document in MongoDB carrying an owner, a fence, a sequence number and an expiry.
{ _id: "<uuid>", owner: "geo:world:region" | null, fence: long, // +1 on every ownership change seq: long, // +1 on every save expiresAt: Date, snapshot: { ... }, transfer: { to, from, token, at } | null}
The “ticket number” above is fence. Every update filters on both owner and fence; a late write from a shard that has lost the player matches nothing, returns empty, and the caller stops rather than clobbering the new owner’s state. The handoff writes the snapshot, moves ownership, bumps the fence and writes the transfer marker in a single atomic update. A revert matches on the exact fence the handoff produced.
Why this needs no transactions
Every one of those is a single-document update, and single-document atomicity is something every MongoDB deployment provides, standalone included. Atlas asks the server what it is on startup and reads with majority on a replica set or local on a standalone, which is the same guarantee on one node rather than a weaker one.The only thing a standalone gives up is the multi-document transaction helper offered to other plugins. Nothing in the crossing path uses it.
Next
The crossing
What actually happens in the second a player steps over a line.
Configuration
Every setting, including the grid ones, and which must match across the network.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Atlas","description":"Spatial world sharding for Paper. One Minecraft world across several servers, with borders players can walk across.","colors":{"primary":"#1E6F5C","light":"#5FBF9F","dark":"#14503F"},"logo":{"light":"https://mintcdn.com/craftsupport/MpjWOJVCDyahgiWv/logo/light.svg?fit=max\u0026auto=format\u0026n=MpjWOJVCDyahgiWv\u0026q=85\u0026s=7df739b687bf29031b961c47919e3318","dark":"https://mintcdn.com/craftsupport/MpjWOJVCDyahgiWv/logo/dark.svg?fit=max\u0026auto=format\u0026n=MpjWOJVCDyahgiWv\u0026q=85\u0026s=ab87333f9a1b792e72316ae4fa6d1b2d"},"favicon":"https://mintcdn.com/craftsupport/MpjWOJVCDyahgiWv/favicon.svg?fit=max\u0026auto=format\u0026n=MpjWOJVCDyahgiWv\u0026q=85\u0026s=b9b90d3400c0343fe76b8dd19e73b30e","navbar":{"links":[{"href":"mailto:smashyalts@gmail.com","label":"Support"}]},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"craftsupport","hasAudioNarration":false,"actualSubdomain":"craftsupport","customDomains":["docs.craftsupport.dev"],"gitSource":{"type":"github","owner":"smashyalts","repo":"mintlify-docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"entitlements":{},"buildId":"6ad278197e75420d4b0e4bb0","clientVersion":"0.0.4270","searchFilterCounts":[{"language":"default","tag":"Documentation","count":22},{"language":"default","tag":"Operating","count":7},{"language":"default","tag":"Deploying","count":6},{"language":"default","tag":"Concepts","count":5},{"language":"default","tag":"API Reference","count":4},{"language":"default","tag":"Plugin API","count":4},{"language":"default","tag":"Get Started","count":2},{"language":"default","tag":"Reference","count":2}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"concepts/grid-and-ownership","slug":"/concepts/grid-and-ownership","pageMetadata":{"title":"Grid and ownership","description":"Who owns a block, who owns a player, and what stops two servers both believing they do","icon":"grid","href":"/concepts/grid-and-ownership"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Who owns a block, who owns a player, and what stops two servers both believing they do\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Accordion,AccordionGroup,Card,CardGroup,CodeBlock,CodeGroup,Frame,Heading,Note,OptimizedImage,Step,Steps,Table,Warning}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!AccordionGroup)_missingMdxReference(`AccordionGroup`,true);if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Atlas cuts your world into squares. Each square is run by one Paper server, and `,_jsx(_components.strong,{children:`only that server is allowed to change anything inside it`}),`.`]}),`\n`,_jsx(_components.p,{children:`That single rule is the whole design. Everything else on this page exists to keep it true while players walk around.`}),`\n`,_jsx(Heading,{level:`2`,id:`your-world-cut-into-squares`,children:`Your world, cut into squares`}),`\n`,_jsx(_components.p,{children:`Out of the box Atlas makes four squares of 2048 x 2048 blocks, arranged 2 across and 2 down, centred on the world origin.`}),`\n`,_jsxs(Frame,{caption:`The default grid. x increases to the east, z increases to the south. Each square is one Paper server.`,children:[_jsx(OptimizedImage,{className:`mint-block dark:mint-hidden`,src:`https://mintcdn.com/craftsupport/ZFwBEBeXxol__0sM/diagrams/grid-light.svg?fit=max\u0026auto=format\u0026n=ZFwBEBeXxol__0sM\u0026q=85\u0026s=e4150b02f220fce8ca94e132fcedd6b9`,alt:`A two by two grid of four regions centred on the world origin, numbered 0 and 1 on the top row and 2 and 3 on the bottom row`,\"data-og-width\":`600`,width:`600`,\"data-og-height\":`480`,height:`480`,\"data-path\":`diagrams/grid-light.svg`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/craftsupport/ZFwBEBeXxol__0sM/diagrams/grid-light.svg?w=280\u0026fit=max\u0026auto=format\u0026n=ZFwBEBeXxol__0sM\u0026q=85\u0026s=7d2edc77916e43298df207358f55f392 280w, https://mintcdn.com/craftsupport/ZFwBEBeXxol__0sM/diagrams/grid-light.svg?w=560\u0026fit=max\u0026auto=format\u0026n=ZFwBEBeXxol__0sM\u0026q=85\u0026s=cb24a1f05970c9913ed1f4b880fd9597 560w, https://mintcdn.com/craftsupport/ZFwBEBeXxol__0sM/diagrams/grid-light.svg?w=840\u0026fit=max\u0026auto=format\u0026n=ZFwBEBeXxol__0sM\u0026q=85\u0026s=ee1f401a1e8d7106d5b4c8e402424f62 840w, https://mintcdn.com/craftsupport/ZFwBEBeXxol__0sM/diagrams/grid-light.svg?w=1100\u0026fit=max\u0026auto=format\u0026n=ZFwBEBeXxol__0sM\u0026q=85\u0026s=a2c5d930746322117d19c864af84091d 1100w, https://mintcdn.com/craftsupport/ZFwBEBeXxol__0sM/diagrams/grid-light.svg?w=1650\u0026fit=max\u0026auto=format\u0026n=ZFwBEBeXxol__0sM\u0026q=85\u0026s=adf75ed74e6cf965f4312317eb9090fe 1650w, https://mintcdn.com/craftsupport/ZFwBEBeXxol__0sM/diagrams/grid-light.svg?w=2500\u0026fit=max\u0026auto=format\u0026n=ZFwBEBeXxol__0sM\u0026q=85\u0026s=fcee87e02bc4c0a0ba15bfcf6ec46323 2500w`}),_jsx(OptimizedImage,{className:`mint-hidden dark:mint-block`,src:`https://mintcdn.com/craftsupport/ZFwBEBeXxol__0sM/diagrams/grid-dark.svg?fit=max\u0026auto=format\u0026n=ZFwBEBeXxol__0sM\u0026q=85\u0026s=b0d0c4d2e423ed8c39f4e713f02a53b5`,alt:`A two by two grid of four regions centred on the world origin, numbered 0 and 1 on the top row and 2 and 3 on the bottom row`,\"data-og-width\":`600`,width:`600`,\"data-og-height\":`480`,height:`480`,\"data-path\":`diagrams/grid-dark.svg`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/craftsupport/ZFwBEBeXxol__0sM/diagrams/grid-dark.svg?w=280\u0026fit=max\u0026auto=format\u0026n=ZFwBEBeXxol__0sM\u0026q=85\u0026s=c47c637dcb6bb1ecfbd7e092dec414d3 280w, https://mintcdn.com/craftsupport/ZFwBEBeXxol__0sM/diagrams/grid-dark.svg?w=560\u0026fit=max\u0026auto=format\u0026n=ZFwBEBeXxol__0sM\u0026q=85\u0026s=9a3d7eab0ed51dfc8714f3f647c3d117 560w, https://mintcdn.com/craftsupport/ZFwBEBeXxol__0sM/diagrams/grid-dark.svg?w=840\u0026fit=max\u0026auto=format\u0026n=ZFwBEBeXxol__0sM\u0026q=85\u0026s=87742bd96352bcbf676232057a35b1e7 840w, https://mintcdn.com/craftsupport/ZFwBEBeXxol__0sM/diagrams/grid-dark.svg?w=1100\u0026fit=max\u0026auto=format\u0026n=ZFwBEBeXxol__0sM\u0026q=85\u0026s=74a63b97cacc1a60a7196bac53d63e5d 1100w, https://mintcdn.com/craftsupport/ZFwBEBeXxol__0sM/diagrams/grid-dark.svg?w=1650\u0026fit=max\u0026auto=format\u0026n=ZFwBEBeXxol__0sM\u0026q=85\u0026s=d1652a112310fbd0672205c52ddf78d3 1650w, https://mintcdn.com/craftsupport/ZFwBEBeXxol__0sM/diagrams/grid-dark.svg?w=2500\u0026fit=max\u0026auto=format\u0026n=ZFwBEBeXxol__0sM\u0026q=85\u0026s=3d1cb5dc7de2c6ce07a10251bd60f82e 2500w`})]}),`\n`,_jsx(_components.p,{children:`Regions are numbered left to right, then top to bottom, starting at the north-west corner:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Region`}),_jsx(_components.th,{children:`Runs on`}),_jsx(_components.th,{children:`Covers x`}),_jsx(_components.th,{children:`Covers z`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`0`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`world-r0`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`-2048 to 0`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`-2048 to 0`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`1`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`world-r1`})}),_jsx(_components.td,{children:`0 to 2048`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`-2048 to 0`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`2`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`world-r2`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`-2048 to 0`}),_jsx(_components.td,{children:`0 to 2048`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`3`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`world-r3`})}),_jsx(_components.td,{children:`0 to 2048`}),_jsx(_components.td,{children:`0 to 2048`})]})]})]}),`\n`,_jsx(_components.p,{children:`A block sitting exactly on a border line belongs to one region and never to both. The square starting at a line owns it, which is why spawn at 0,0 belongs to region 3 and not to region 0.`}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`There is nothing magic about the region numbers. They are just the order the squares are counted in, and they are what you put in each server’s `,_jsx(_components.code,{children:`shard.region`}),` setting.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`the-three-numbers-you-choose`,children:`The three numbers you choose`}),`\n`,_jsxs(CardGroup,{cols:3,children:[_jsx(Card,{title:`region-size`,icon:`ruler`,children:_jsxs(_components.p,{children:[`How many blocks wide each square is. Default `,_jsx(_components.code,{children:`2048`}),`. Minimum 256, and a multiple of 16.`]})}),_jsx(Card,{title:`regions-x`,icon:`arrows-left-right`,children:_jsxs(_components.p,{children:[`How many squares across. Default `,_jsx(_components.code,{children:`2`}),`.`]})}),_jsx(Card,{title:`regions-z`,icon:`arrows-up-down`,children:_jsxs(_components.p,{children:[`How many squares down. Default `,_jsx(_components.code,{children:`2`}),`.`]})})]}),`\n`,_jsx(_components.p,{children:`Multiply them and you get two things at once: how many servers you need, and how big your world is.`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`How many servers`,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`servers = regions-x x regions-z`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),_jsx(CodeBlock,{filename:`How big the world is`,numberOfLines:`3`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`world width = regions-x x region-size`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`world depth = regions-z x region-size`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})})]}),`\n`,_jsx(_components.p,{children:`Some setups that people actually run:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Shards`}),_jsx(_components.th,{children:`regions-x`}),_jsx(_components.th,{children:`regions-z`}),_jsx(_components.th,{children:`region-size`}),_jsx(_components.th,{children:`World covered`}),_jsx(_components.th,{children:`Good for`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`2`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`2`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`1`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`2048`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`4096 x 2048`}),_jsx(_components.td,{children:`The smallest real test`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`4`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`2`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`2`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`2048`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`4096 x 4096`}),_jsx(_components.td,{children:`The default. A normal SMP`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`4`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`4`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`1`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`1024`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`4096 x 1024`}),_jsx(_components.td,{children:`A long east-west map`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`9`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`3`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`3`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`2048`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`6144 x 6144`}),_jsx(_components.td,{children:`A big survival world`})]})]})]}),`\n`,_jsx(_components.p,{children:`Bigger squares mean fewer borders and fewer crossings, so fewer moving parts. Smaller squares spread load more evenly but put players near a line more often. If you are unsure, leave all three alone.`}),`\n`,_jsx(Heading,{level:`2`,id:`the-edge-of-the-map`,children:`The edge of the map`}),`\n`,_jsx(_components.p,{children:`Outside the grid, nobody owns anything, so nothing may happen there. Players who reach the outer edge are pushed back inside, and entities that wander out are removed. You do not need a vanilla world border to make this work, though setting one to match keeps players from bumping into an invisible wall with no explanation.`}),`\n`,_jsx(Heading,{level:`2`,id:`what-happens-near-a-border`,children:`What happens near a border`}),`\n`,_jsx(_components.p,{children:`A border is not a wall and not a loading screen. For a strip of blocks either side of every line, each server shows you what is happening on the other side.`}),`\n`,_jsxs(Frame,{caption:`Looking down on a single border. Not to scale - the band is 64 blocks out of a 2048 block square.`,children:[_jsx(OptimizedImage,{className:`mint-block dark:mint-hidden`,src:`https://mintcdn.com/craftsupport/ZFwBEBeXxol__0sM/diagrams/border-light.svg?fit=max\u0026auto=format\u0026n=ZFwBEBeXxol__0sM\u0026q=85\u0026s=f9ca012a05e0d08290b7477807d36392`,alt:`Cross-section of one border showing a 64 block ghost band on each side, with a player walking towards the line`,\"data-og-width\":`600`,width:`600`,\"data-og-height\":`250`,height:`250`,\"data-path\":`diagrams/border-light.svg`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/craftsupport/ZFwBEBeXxol__0sM/diagrams/border-light.svg?w=280\u0026fit=max\u0026auto=format\u0026n=ZFwBEBeXxol__0sM\u0026q=85\u0026s=bebce8b264943b46fa3eca1276a4676f 280w, https://mintcdn.com/craftsupport/ZFwBEBeXxol__0sM/diagrams/border-light.svg?w=560\u0026fit=max\u0026auto=format\u0026n=ZFwBEBeXxol__0sM\u0026q=85\u0026s=7f3986a363f98b2215e0752ebdc29734 560w, https://mintcdn.com/craftsupport/ZFwBEBeXxol__0sM/diagrams/border-light.svg?w=840\u0026fit=max\u0026auto=format\u0026n=ZFwBEBeXxol__0sM\u0026q=85\u0026s=d562d84c94ca829d6c979fe36665b4c3 840w, https://mintcdn.com/craftsupport/ZFwBEBeXxol__0sM/diagrams/border-light.svg?w=1100\u0026fit=max\u0026auto=format\u0026n=ZFwBEBeXxol__0sM\u0026q=85\u0026s=85e80e357cce3eccddbb71c5a0d90238 1100w, https://mintcdn.com/craftsupport/ZFwBEBeXxol__0sM/diagrams/border-light.svg?w=1650\u0026fit=max\u0026auto=format\u0026n=ZFwBEBeXxol__0sM\u0026q=85\u0026s=3cce06d751b23167e945f7bac3f8fe23 1650w, https://mintcdn.com/craftsupport/ZFwBEBeXxol__0sM/diagrams/border-light.svg?w=2500\u0026fit=max\u0026auto=format\u0026n=ZFwBEBeXxol__0sM\u0026q=85\u0026s=57d5fa0e469e468e6dd1c9ee7fe9daba 2500w`}),_jsx(OptimizedImage,{className:`mint-hidden dark:mint-block`,src:`https://mintcdn.com/craftsupport/ZFwBEBeXxol__0sM/diagrams/border-dark.svg?fit=max\u0026auto=format\u0026n=ZFwBEBeXxol__0sM\u0026q=85\u0026s=bda79d3749347879c1abf745c67c7924`,alt:`Cross-section of one border showing a 64 block ghost band on each side, with a player walking towards the line`,\"data-og-width\":`600`,width:`600`,\"data-og-height\":`250`,height:`250`,\"data-path\":`diagrams/border-dark.svg`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/craftsupport/ZFwBEBeXxol__0sM/diagrams/border-dark.svg?w=280\u0026fit=max\u0026auto=format\u0026n=ZFwBEBeXxol__0sM\u0026q=85\u0026s=88f9ae936e3b1f98c4d4d70d70adb71d 280w, https://mintcdn.com/craftsupport/ZFwBEBeXxol__0sM/diagrams/border-dark.svg?w=560\u0026fit=max\u0026auto=format\u0026n=ZFwBEBeXxol__0sM\u0026q=85\u0026s=27b3e497e45055b5a84b96b3ccf80ba1 560w, https://mintcdn.com/craftsupport/ZFwBEBeXxol__0sM/diagrams/border-dark.svg?w=840\u0026fit=max\u0026auto=format\u0026n=ZFwBEBeXxol__0sM\u0026q=85\u0026s=a8d3d3030300180d6ec34e3d71bf4082 840w, https://mintcdn.com/craftsupport/ZFwBEBeXxol__0sM/diagrams/border-dark.svg?w=1100\u0026fit=max\u0026auto=format\u0026n=ZFwBEBeXxol__0sM\u0026q=85\u0026s=77db5712a96d0a343d153fff2e3c1414 1100w, https://mintcdn.com/craftsupport/ZFwBEBeXxol__0sM/diagrams/border-dark.svg?w=1650\u0026fit=max\u0026auto=format\u0026n=ZFwBEBeXxol__0sM\u0026q=85\u0026s=0d4f6ca542abc91dc61294bbef131d10 1650w, https://mintcdn.com/craftsupport/ZFwBEBeXxol__0sM/diagrams/border-dark.svg?w=2500\u0026fit=max\u0026auto=format\u0026n=ZFwBEBeXxol__0sM\u0026q=85\u0026s=1466495ff9de011b7d81d94efb6f7b96 2500w`})]}),`\n`,_jsx(_components.p,{children:`Two measurements drive this, and neither is something you set directly:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`How close you are to your own square’s edge`}),` decides when the neighbour is warmed up in advance, and which of your blocks are worth copying over.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`How close you are to the neighbour’s square`}),` decides whether you show up as a ghost on their side.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`The band is `,_jsx(_components.code,{children:`tuning.ghost-width`}),`, 64 blocks by default. It can never be wider than a quarter of a region, because two bands of the same square would overlap and a server would start copying its own copies. Atlas refuses to start rather than let that happen. The details are in `,_jsx(_components.a,{href:`/concepts/ghosts-and-blocks`,children:`Ghosts and blocks`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`two-things-are-owned-in-two-different-ways`,children:`Two things are owned, in two different ways`}),`\n`,_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`Ground never moves`,icon:`mountain`,children:_jsx(_components.p,{children:`Which server owns a block is pure arithmetic on its coordinates. Every server and every proxy works it out independently and always gets the same answer. Nothing is looked up, so nothing can go stale or disagree.`})}),_jsx(Card,{title:`Players move constantly`,icon:`person-walking`,children:_jsx(_components.p,{children:`A player cannot be owned by arithmetic, because they walk. Instead each player has one ticket in the database saying which server holds them right now, and handing the ticket over is a single, indivisible step.`})})]}),`\n`,_jsx(Heading,{level:`2`,id:`the-ticket-in-plain-terms`,children:`The ticket, in plain terms`}),`\n`,_jsx(_components.p,{children:`Think of it as a numbered baton. There is exactly one per player, and the number goes up by one every time it changes hands.`}),`\n`,_jsxs(Frame,{caption:`Ownership of a player over time. The two servers touch but never overlap.`,children:[_jsx(OptimizedImage,{className:`mint-block dark:mint-hidden`,src:`https://mintcdn.com/craftsupport/ZFwBEBeXxol__0sM/diagrams/ownership-light.svg?fit=max\u0026auto=format\u0026n=ZFwBEBeXxol__0sM\u0026q=85\u0026s=2412f755c91f4ff58cbc98a4f48eb06c`,alt:`A timeline showing server A in charge, then a single handoff moment, then server B in charge, with the ticket number going from 7 to 8`,\"data-og-width\":`600`,width:`600`,\"data-og-height\":`200`,height:`200`,\"data-path\":`diagrams/ownership-light.svg`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/craftsupport/ZFwBEBeXxol__0sM/diagrams/ownership-light.svg?w=280\u0026fit=max\u0026auto=format\u0026n=ZFwBEBeXxol__0sM\u0026q=85\u0026s=c0844f5130932b2ea3694d1ee8a5d3d7 280w, https://mintcdn.com/craftsupport/ZFwBEBeXxol__0sM/diagrams/ownership-light.svg?w=560\u0026fit=max\u0026auto=format\u0026n=ZFwBEBeXxol__0sM\u0026q=85\u0026s=a92356e7b7c38fe68ae0b26dce488938 560w, https://mintcdn.com/craftsupport/ZFwBEBeXxol__0sM/diagrams/ownership-light.svg?w=840\u0026fit=max\u0026auto=format\u0026n=ZFwBEBeXxol__0sM\u0026q=85\u0026s=979bc5322992456bd8302a19160cadb6 840w, https://mintcdn.com/craftsupport/ZFwBEBeXxol__0sM/diagrams/ownership-light.svg?w=1100\u0026fit=max\u0026auto=format\u0026n=ZFwBEBeXxol__0sM\u0026q=85\u0026s=f2cee663f02ac112f05b364d1363ee23 1100w, https://mintcdn.com/craftsupport/ZFwBEBeXxol__0sM/diagrams/ownership-light.svg?w=1650\u0026fit=max\u0026auto=format\u0026n=ZFwBEBeXxol__0sM\u0026q=85\u0026s=94fc07a2995e39a681b196dcfa8db7d8 1650w, https://mintcdn.com/craftsupport/ZFwBEBeXxol__0sM/diagrams/ownership-light.svg?w=2500\u0026fit=max\u0026auto=format\u0026n=ZFwBEBeXxol__0sM\u0026q=85\u0026s=b84a3aa46dac38dd105eca106c58d074 2500w`}),_jsx(OptimizedImage,{className:`mint-hidden dark:mint-block`,src:`https://mintcdn.com/craftsupport/ZFwBEBeXxol__0sM/diagrams/ownership-dark.svg?fit=max\u0026auto=format\u0026n=ZFwBEBeXxol__0sM\u0026q=85\u0026s=072bf6df05b159ad754ac01bfad02ec6`,alt:`A timeline showing server A in charge, then a single handoff moment, then server B in charge, with the ticket number going from 7 to 8`,\"data-og-width\":`600`,width:`600`,\"data-og-height\":`200`,height:`200`,\"data-path\":`diagrams/ownership-dark.svg`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/craftsupport/ZFwBEBeXxol__0sM/diagrams/ownership-dark.svg?w=280\u0026fit=max\u0026auto=format\u0026n=ZFwBEBeXxol__0sM\u0026q=85\u0026s=b3fd4f882950e50ceccc7aa17007365d 280w, https://mintcdn.com/craftsupport/ZFwBEBeXxol__0sM/diagrams/ownership-dark.svg?w=560\u0026fit=max\u0026auto=format\u0026n=ZFwBEBeXxol__0sM\u0026q=85\u0026s=f095c3749580359f8f1fb046cfab13c4 560w, https://mintcdn.com/craftsupport/ZFwBEBeXxol__0sM/diagrams/ownership-dark.svg?w=840\u0026fit=max\u0026auto=format\u0026n=ZFwBEBeXxol__0sM\u0026q=85\u0026s=a739a8b993232ac7b7ef24176fa46f81 840w, https://mintcdn.com/craftsupport/ZFwBEBeXxol__0sM/diagrams/ownership-dark.svg?w=1100\u0026fit=max\u0026auto=format\u0026n=ZFwBEBeXxol__0sM\u0026q=85\u0026s=402bfc93f1f3a4835e2dd6760dad26aa 1100w, https://mintcdn.com/craftsupport/ZFwBEBeXxol__0sM/diagrams/ownership-dark.svg?w=1650\u0026fit=max\u0026auto=format\u0026n=ZFwBEBeXxol__0sM\u0026q=85\u0026s=559c9e9d4be61b3ecd3d27b025079577 1650w, https://mintcdn.com/craftsupport/ZFwBEBeXxol__0sM/diagrams/ownership-dark.svg?w=2500\u0026fit=max\u0026auto=format\u0026n=ZFwBEBeXxol__0sM\u0026q=85\u0026s=d8e214bdcf2adef9e3da3324a3d6227f 2500w`})]}),`\n`,_jsx(_components.p,{children:`Four rules make that safe. None of them need anything special from your database.`}),`\n`,_jsxs(Steps,{children:[_jsx(Step,{title:`Only the holder may save, and only with the current number`,children:_jsx(_components.p,{children:`Every save says “I am server A and I hold ticket 7”. If the ticket has moved on to 8, the save matches nothing and is thrown away. A server that lagged out and came back cannot overwrite what happened while it was gone.`})}),_jsx(Step,{title:`Handing over is one indivisible step`,children:_jsx(_components.p,{children:`Saving the player’s state, changing the holder and bumping the number all happen in the same single write. There is no instant where the inventory says one thing and the ownership says another.`})}),_jsx(Step,{title:`A crashed server loses its grip on its own`,children:_jsx(_components.p,{children:`The holder has to keep renewing the ticket. A server that dies stops renewing, and after 30 seconds someone else may pick the player up. If the dead server wakes up later, its number is out of date and it is locked out.`})}),_jsx(Step,{title:`A handoff can be undone, but only before it lands`,children:_jsx(_components.p,{children:`If the other side never answers, the first server can take the player back. That undo only works while the number is still exactly what the handoff produced. Once the target has actually claimed the player, the number has moved and the undo fails, so two servers can never both conclude they hold the same person.`})})]}),`\n`,_jsx(Heading,{level:`2`,id:`before-you-change-any-of-this`,children:`Before you change any of this`}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`The grid must be identical on every shard and every proxy.`}),` A single server with a different `,_jsx(_components.code,{children:`region-size`}),` will route players to a shard that does not own where they are standing, and nothing will detect it for you. Leaving all three settings unset, so everyone takes the same defaults, is the safest way to keep them in step.`]})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Changing the grid later is a full network restart, not a rolling one.`}),` Resizing the squares changes which region a standing player belongs to, so every shard and proxy has to come back with the new numbers together.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`under-the-hood`,children:`Under the hood`}),`\n`,_jsx(_components.p,{children:`The exact behaviour, for when you need to verify something rather than understand it.`}),`\n`,_jsxs(AccordionGroup,{children:[_jsxs(Accordion,{title:`The arithmetic`,icon:`calculator`,id:`the-arithmetic`,children:[_jsx(_components.p,{children:`The grid is centred on the origin, so borders fall on multiples of the region size.`}),_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`originX = -(regionsX * regionSize) / 2`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`region = gz * regionsX + gx where gx = floor((x - originX) / regionSize)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),_jsxs(_components.p,{children:[`Region `,_jsx(_components.code,{children:`i`}),` covers a half-open square `,_jsx(_components.code,{children:`[minX, maxX)`}),` by `,_jsx(_components.code,{children:`[minZ, maxZ)`}),`, so a block on a border line belongs to exactly one region. Numbering is row-major from the north-west corner:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` x=0 x=1`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` z=0 [ 0 ][ 1 ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` z=1 [ 2 ][ 3 ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),_jsxs(_components.p,{children:[`Outside the grid the region index is reported as `,_jsx(_components.code,{children:`-1`}),`. The grid is derived from config and never from Redis, so a topology outage cannot change who owns what.`]})]}),_jsxs(Accordion,{title:`The two distances`,icon:`ruler-combined`,id:`the-two-distances`,children:[_jsx(_components.p,{children:`The distance from a point to its own region’s nearest edge decides when to warm up a neighbour and which blocks are worth mirroring. The distance from a point to another region’s rectangle, zero inside it, decides whether something belongs in that neighbour’s ghost band.`}),_jsx(_components.p,{children:`The ghost band must be no wider than a quarter of a region, or opposite bands of the same region overlap and a shard starts mirroring its own mirrored blocks. The configuration refuses to start otherwise.`})]}),_jsxs(Accordion,{title:`The fenced lease document`,icon:`lock`,id:`the-fenced-lease-document`,children:[_jsx(_components.p,{children:`A player is one document in MongoDB carrying an owner, a fence, a sequence number and an expiry.`}),_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` _id: \"\u003cuuid>\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` owner: \"geo:world:region\" | null,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` fence: long, // +1 on every ownership change`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` seq: long, // +1 on every save`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` expiresAt: Date,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` snapshot: { ... },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` transfer: { to, from, token, at } | null`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),_jsxs(_components.p,{children:[`The “ticket number” above is `,_jsx(_components.code,{children:`fence`}),`. Every update filters on both `,_jsx(_components.code,{children:`owner`}),` and `,_jsx(_components.code,{children:`fence`}),`; a late write from a shard that has lost the player matches nothing, returns empty, and the caller stops rather than clobbering the new owner’s state. The handoff writes the snapshot, moves ownership, bumps the fence and writes the transfer marker in a single atomic update. A revert matches on the exact fence the handoff produced.`]})]}),_jsxs(Accordion,{title:`Why this needs no transactions`,icon:`database`,id:`why-this-needs-no-transactions`,children:[_jsxs(_components.p,{children:[`Every one of those is a single-document update, and single-document atomicity is something every MongoDB deployment provides, standalone included. Atlas asks the server what it is on startup and reads with `,_jsx(_components.code,{children:`majority`}),` on a replica set or `,_jsx(_components.code,{children:`local`}),` on a standalone, which is the same guarantee on one node rather than a weaker one.`]}),_jsx(_components.p,{children:`The only thing a standalone gives up is the multi-document transaction helper offered to other plugins. Nothing in the crossing path uses it.`})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`next`,children:`Next`}),`\n`,_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`The crossing`,icon:`person-walking`,href:`/concepts/crossing`,children:_jsx(_components.p,{children:`What actually happens in the second a player steps over a line.`})}),_jsx(Card,{title:`Configuration`,icon:`sliders`,href:`/deploy/configuration`,children:_jsx(_components.p,{children:`Every setting, including the grid ones, and which must match across the network.`})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Grid and ownership","description":"Who owns a block, who owns a player, and what stops two servers both believing they do","icon":"grid","href":"/concepts/grid-and-ownership"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Your world, cut into squares","slug":"your-world-cut-into-squares","depth":2,"children":[]},{"title":"The three numbers you choose","slug":"the-three-numbers-you-choose","depth":2,"children":[]},{"title":"The edge of the map","slug":"the-edge-of-the-map","depth":2,"children":[]},{"title":"What happens near a border","slug":"what-happens-near-a-border","depth":2,"children":[]},{"title":"Two things are owned, in two different ways","slug":"two-things-are-owned-in-two-different-ways","depth":2,"children":[]},{"title":"The ticket, in plain terms","slug":"the-ticket-in-plain-terms","depth":2,"children":[]},{"title":"Before you change any of this","slug":"before-you-change-any-of-this","depth":2,"children":[]},{"title":"Under the hood","slug":"under-the-hood","depth":2,"children":[]},{"title":"Next","slug":"next","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"dynamicCss":".mint-block {\n display: block\n}\n.mint-hidden {\n display: none\n}\n.dark\\:mint-block:is(.dark *) {\n display: block\n}\n.dark\\:mint-hidden:is(.dark *) {\n display: none\n}","subdomain":"craftsupport","siteName":"Atlas","title":"Grid and ownership - Atlas","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-13T02:19:02.998Z","originalFileLocation":"concepts/grid-and-ownership.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Who owns a block, who owns a player, and what stops two servers both believing they do\">\u003cmeta data-mint-head name=\"application-name\" content=\"Atlas\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/craftsupport/eF8MciFWfwuJS6Vh/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/craftsupport/eF8MciFWfwuJS6Vh/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/craftsupport/eF8MciFWfwuJS6Vh/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/craftsupport/eF8MciFWfwuJS6Vh/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/craftsupport/eF8MciFWfwuJS6Vh/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/craftsupport/eF8MciFWfwuJS6Vh/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/craftsupport/eF8MciFWfwuJS6Vh/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/craftsupport/eF8MciFWfwuJS6Vh/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/craftsupport/eF8MciFWfwuJS6Vh/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Grid and ownership - Atlas\">\u003cmeta data-mint-head property=\"og:description\" content=\"Who owns a block, who owns a player, and what stops two servers both believing they do\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Atlas\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.craftsupport.dev/concepts/grid-and-ownership\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://craftsupport.mintlify.site/_mintlify/api/og/v2?division=Concepts\u0026amp;title=Grid+and+ownership\u0026amp;description=Who+owns+a+block%2C+who+owns+a+player%2C+and+what+stops+two+servers+both+believing+they+do\u0026amp;theme=7f69d1a714fa4ad43a252e7d\u0026amp;signature=5cf2d1c2b836468cba1d9ce938625d360c82913fa9d00c605e03f34667ba8995\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Grid and ownership - Atlas\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Who owns a block, who owns a player, and what stops two servers both believing they do\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://craftsupport.mintlify.site/_mintlify/api/og/v2?division=Concepts\u0026amp;title=Grid+and+ownership\u0026amp;description=Who+owns+a+block%2C+who+owns+a+player%2C+and+what+stops+two+servers+both+believing+they+do\u0026amp;theme=7f69d1a714fa4ad43a252e7d\u0026amp;signature=5cf2d1c2b836468cba1d9ce938625d360c82913fa9d00c605e03f34667ba8995\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/craftsupport/eF8MciFWfwuJS6Vh/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Atlas\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#1E6F5C\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.craftsupport.dev/concepts/grid-and-ownership\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/concepts/grid-and-ownership.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.craftsupport.dev/#organization\",\"name\":\"Atlas\",\"url\":\"https://docs.craftsupport.dev\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/craftsupport/MpjWOJVCDyahgiWv/logo/light.svg?fit=max\u0026auto=format\u0026n=MpjWOJVCDyahgiWv\u0026q=85\u0026s=7df739b687bf29031b961c47919e3318\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.craftsupport.dev#website\",\"name\":\"Atlas\",\"url\":\"https://docs.craftsupport.dev\",\"publisher\":{\"@id\":\"https://docs.craftsupport.dev/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.craftsupport.dev/concepts/grid-and-ownership#webpage\",\"url\":\"https://docs.craftsupport.dev/concepts/grid-and-ownership\",\"name\":\"Grid and ownership\",\"description\":\"Who owns a block, who owns a player, and what stops two servers both believing they do\",\"dateModified\":\"2026-09-13T02:19:02.998Z\",\"isPartOf\":{\"@id\":\"https://docs.craftsupport.dev#website\"},\"breadcrumb\":{\"@id\":\"https://docs.craftsupport.dev/concepts/grid-and-ownership#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.craftsupport.dev/concepts/grid-and-ownership#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Atlas\",\"item\":\"https://docs.craftsupport.dev\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Grid and ownership\",\"item\":\"https://docs.craftsupport.dev/concepts/grid-and-ownership\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.craftsupport.dev/concepts/grid-and-ownership#article\",\"headline\":\"Grid and ownership\",\"name\":\"Grid and ownership\",\"description\":\"Who owns a block, who owns a player, and what stops two servers both believing they do\",\"url\":\"https://docs.craftsupport.dev/concepts/grid-and-ownership\",\"mainEntityOfPage\":{\"@id\":\"https://docs.craftsupport.dev/concepts/grid-and-ownership#webpage\"},\"dateModified\":\"2026-09-13T02:19:02.998Z\",\"publisher\":{\"@id\":\"https://docs.craftsupport.dev/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.craftsupport.dev#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Atlas\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Atlas\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/concepts/grid-and-ownership.md","siteName":"Atlas","nav":{"global":null,"tabs":[{"tab":"Documentation","groups":[{"group":"Get Started","pages":[{"title":"Introduction","icon":"map","href":"/introduction"},{"title":"Quickstart","description":"The smallest network that actually works, on a panel, in about twenty minutes","icon":"rocket","href":"/quickstart"}]},{"group":"Concepts","icon":"diagram-project","pages":[{"title":"Grid and ownership","icon":"grid","href":"/concepts/grid-and-ownership"},{"title":"The crossing","description":"What happens between the last step on one server and the first on the next","icon":"person-walking","href":"/concepts/crossing"},{"title":"Ghosts and blocks","icon":"ghost","href":"/concepts/ghosts-and-blocks"},{"title":"Same seed, no world copy","icon":"layer-group","href":"/concepts/border-chunks"},{"title":"Across continents","icon":"globe","href":"/concepts/cross-geo"}]},{"group":"Deploying","icon":"server","pages":[{"title":"Requirements","icon":"clipboard-check","href":"/deploy/requirements"},{"title":"Panel and VPS hosting","icon":"server","href":"/deploy/shared-hosting"},{"title":"Configuration","icon":"sliders","href":"/deploy/configuration"},{"title":"Moving an existing server onto Atlas","icon":"truck-ramp-box","href":"/deploy/migrating"},{"title":"Security","icon":"shield","href":"/deploy/security"},{"title":"Claims and protection","icon":"shield-halved","href":"/deploy/protection"}]},{"group":"Operating","icon":"gauge","pages":[{"title":"Commands","icon":"terminal","href":"/operate/commands"},{"title":"Base plugins","icon":"puzzle-piece","href":"/operate/base-plugins"},{"title":"The change log","icon":"clock-rotate-left","href":"/operate/audit"},{"title":"Restarts and rollouts","icon":"arrows-rotate","href":"/operate/rollouts"},{"title":"Splitting a shard","icon":"scissors","href":"/operate/splitting"},{"title":"Troubleshooting","icon":"circle-question","href":"/operate/troubleshooting"},{"title":"The test network","icon":"flask","href":"/operate/testing"}]},{"group":"Reference","icon":"book","pages":[{"title":"Protocol and storage","icon":"code","href":"/reference/protocol"},{"title":"Limitations","icon":"triangle-exclamation","href":"/reference/limitations"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api/overview"}]}]},"basePath":"","title":"Grid and ownership - Atlas","deploymentId":"dpl_DyXGnKeCjZyA3sUdfMJ7FjkdBefg","buildId":"dpl_DyXGnKeCjZyA3sUdfMJ7FjkdBefg","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-D0FT0qQs.js","DynamicMarkdown-CQM9Bhbv.js","zoom-image-lightbox-BQ4tbj_9.js","lightbox-handle-r17bVUz3.js"]}