Last year I sat in a design review where a team was seriously proposing Citus and a homegrown router service, just to get one PostgreSQL database past the single-writer ceiling. Three teams, three opinions, and about four months of estimated build time before a single production row moved. That's the reason Aurora PostgreSQL Limitless Database matters to me. AWS took the part of sharding everyone hates building, query routing, distributed transactions, shard rebalancing, and put it inside the engine. It went generally available on October 31, 2024, and it's now on PostgreSQL 16.9. If you've been putting off a sharding project because nobody wants to own a router tier, this is worth a real look.
What it actually is
A DB shard group sits on top of an Aurora cluster and gives you two new pieces of infrastructure you don't manage directly: routers and shards. Routers accept your connections, plan queries, and decide whether a statement can run entirely on one shard or needs to be coordinated across several. Shards are where the data actually lives, each one an Aurora PostgreSQL instance under the hood. You connect to one endpoint, write normal SQL, and the routing layer figures out the rest. No pgbouncer-in-front-of-Citus contraption, no custom proxy code.
Tables come in three flavors:
- Sharded tables: split across shards by a shard key you pick.
-
Reference tables: small, mostly-static tables (think a
colorsorcountry_codeslookup) that get replicated to every shard so joins against them stay local. - Standard tables: live on exactly one shard, chosen by the system, for stuff that doesn't need to scale out.
Setting it up
Creating the shard group is a single CLI call once you have a Limitless-enabled cluster (engine version 16.X-limitless, Aurora I/O-Optimized storage):
aws rds create-db-shard-group \
--db-shard-group-identifier my-db-shard-group \
--db-cluster-identifier my-limitless-cluster \
--max-acu 768
Capacity is set in Aurora Capacity Units, ranging from 16 to 6,144 ACUs per shard group (AWS will talk to you if you need more). That max is fixed at creation and doesn't change your router/shard count later, so size it with room, not exactly to today's load.
Now the actual table creation. This is the part that surprised me the first time: you don't get a SHARD BY clause bolted onto CREATE TABLE. Instead you set session variables inside a transaction, then run ordinary DDL:
BEGIN;
SET LOCAL rds_aurora.limitless_create_table_mode = 'sharded';
SET LOCAL rds_aurora.limitless_create_table_shard_key = '{"customer_id"}';
CREATE TABLE orders (
customer_id int NOT NULL,
order_id bigint NOT NULL,
order_total numeric,
PRIMARY KEY (customer_id, order_id)
);
COMMIT;
Notice the primary key includes customer_id. That's not optional: the shard key has to be a subset of every primary and unique key on the table. It's the single most common mistake I'd expect people to hit on day one.
For a table that needs to live next to orders on the same physical shard (avoiding cross-shard joins), use collocation:
BEGIN;
SET LOCAL rds_aurora.limitless_create_table_mode = 'sharded';
SET LOCAL rds_aurora.limitless_create_table_shard_key = '{"customer_id"}';
SET LOCAL rds_aurora.limitless_create_table_collocate_with = 'orders';
CREATE TABLE order_items (
customer_id int NOT NULL,
order_id bigint NOT NULL,
item_id int NOT NULL,
PRIMARY KEY (customer_id, order_id, item_id)
);
COMMIT;
And for a small lookup table you want everywhere:
BEGIN;
SET LOCAL rds_aurora.limitless_create_table_mode = 'reference';
CREATE TABLE shipping_carriers (
carrier_id int PRIMARY KEY,
carrier_name varchar
);
COMMIT;
Once you're done, reset the session so you don't accidentally shard the next table you create in a script:
RESET rds_aurora.limitless_create_table_mode;
Write your application queries as if this were a normal PostgreSQL database. The router figures out whether a statement is single-shard eligible, meaning it has a constant condition on the shard key and can be pushed down whole:
EXPLAIN (VERBOSE, COSTS OFF)
SELECT * FROM orders WHERE customer_id = 100;
-- look for "Single Shard Optimized" in the plan
That's the query shape you want as much of your workload doing as possible. Anything that scans across customer_ids becomes a distributed query with router-side coordination and more round trips.
Where this requires care
This is the part I'd sit down with your team and read line by line before committing to it, because the constraint list is longer than the marketing page suggests.
- Serializable isolation isn't supported. Only repeatable read, read committed, and read uncommitted. If your application logic leans on serializable for correctness, you have rework to do first.
- Triggers aren't supported at all. If your current schema uses triggers for audit trails or denormalization, that logic has to move into the application or a scheduled job.
- Foreign keys on sharded tables must be collocated, and the FK has to be a superset of the shard key. Cross-shard referential integrity the way you're used to just isn't there.
- Shard keys can't be updated. If a row's shard key value needs to change, you delete and re-insert. Plan your key choice like it's permanent, because operationally it is.
- No read replicas, no Global Database, no RDS Proxy, no Blue/Green deployments, no Data API, no cloning. A big chunk of the standard Aurora operational toolkit doesn't apply to a Limitless cluster. If your runbooks depend on any of these, expect gaps.
- Merging shards isn't supported, and you can't delete individual shards or routers. Splitting shards is supported, but shrinking your topology isn't a button you can push. Plan capacity growth in one direction.
-
Sequences behave differently. Values are guaranteed unique but not ordered across sessions and routers,
CYCLEandsetval()aren't supported, andCACHEhas to be smaller than the chunk size. If any code assumes strictly increasing IDs, that assumption breaks here. - Enhanced Monitoring and Performance Insights (31-day minimum retention) are mandatory, not optional add-ons, and they cost money on top of the ACU spend. Budget for it up front rather than discovering it on the first bill.
None of these are dealbreakers on their own, but stacked together they mean Limitless is a genuine architectural commitment, not a checkbox you flip on an existing schema.
My take
I like this more than I expected to. The hard parts of sharding, routing, distributed transaction coordination, keeping joins local, are exactly what nobody wants to own long-term, and AWS put that ownership where it belongs: in the engine, not your application code. But I'd only reach for it once vertical scaling and read replicas have genuinely run out of road, because the missing feature list (triggers, serializable isolation, FK flexibility, RDS Proxy) is a real tax on anything migrating from a conventional schema. Design for it on a greenfield, high-write-volume system, and it's a good trade. Retrofit it onto an app with fifteen years of triggers and foreign keys, and you're in for a rewrite disguised as a migration.
Top comments (0)