AI Dictionary › Fondamenti AI
Sharding is the splitting of a database or workload into fragments (shards) distributed across different machines, each responsible for a portion of the data. When a dataset becomes too large or too hot for a single server, you break it up: each shard is smaller, faster and can be managed in parallel with the others.
Sharding is the splitting of a database or workload into fragments (shards) distributed across different machines, each responsible for a portion of the data. When a dataset becomes too large or too hot for a single server, you break it up: each shard is smaller, faster and can be managed in parallel with the others.
The split follows a shard key: for instance, users with initials A-M on one server and N-Z on another, or more commonly a hash function on the ID that spreads records evenly. A routing layer knows which shard to query for each request. The challenges are well known: queries spanning multiple shards, rebalancing when a shard grows too large, and distributed transactions.
In AI, sharding operates on two fronts: vector databases fragment billions of embeddings across nodes to keep semantic search fast, and distributed training of large models shards weights and optimizer state across GPUs (as in FSDP and ZeRO techniques). Beyond AI, social networks and e-commerce platforms have sharded user data for decades.
Shard means a fragment of pottery or glass, from Old English sceard. Several stories circulate about the computing usage: it is documented that the online game Ultima Online (1997) called its parallel worlds shards, and some link the technical term to that narrative choice, though the attribution is debated. What is certain is that the practice exploded in the 2000s with the growth of the web giants.
Lo sharding è la suddivisione di un database o di un carico di lavoro in frammenti (shard) distribuiti su macchine diverse, ognuna responsabile di una porzione dei dati. Quando un dataset diventa troppo grande o troppo richiesto per un solo server, lo si spezza: ogni shard è più piccolo, più veloce e gestibile in parallelo agli altri.
La suddivisione segue una chiave di sharding: ad esempio, gli utenti con iniziale A-M su un server e N-Z su un altro, o più spesso una funzione di hash sull'ID che distribuisce i record uniformemente. Il sistema di routing sa quale shard interroga per ogni richiesta. Le sfide sono note: query che attraversano più shard, ribilanciamento quando uno shard cresce troppo e transazioni distribuite.
Nell'AI lo sharding opera su due fronti: i database vettoriali frammentano miliardi di embedding su più nodi per mantenere veloce la ricerca semantica, e l'addestramento distribuito dei grandi modelli frammenta pesi e ottimizzatore tra le GPU (come nelle tecniche FSDP e ZeRO). Fuori dall'AI, social network e piattaforme di e-commerce shardano i dati degli utenti da decenni.
Shard in inglese significa coccio, frammento di ceramica o vetro, dall'antico inglese sceard. Sull'origine dell'uso informatico circolano più versioni: è documentato che il gioco online Ultima Online (1997) chiamasse shard i suoi mondi paralleli, e alcuni collegano il termine tecnico a quella scelta narrativa, ma l'attribuzione è dibattuta. Ciò che è certo è che la pratica esplose negli anni 2000 con la crescita dei giganti del web.
From our network
Kaimaki Web — Websites That Win Customers
Custom websites, web apps and digital marketing for growing businesses.
Visit kaimakiweb.com →From the Agora Intelligence blog
📱 Download the Android app (beta) iOS coming soon
Say what you mean. Get what you need.
Grace Certified — the AI coach that trains and certifies your prompt engineering — by Agora Intelligence.