How Bluesky's Decentralized Architecture Stacks Up Against Mastodon and Twitter/X
See which aspects could set Bluesky clearly apart from its rivals.
We are currently witnessing the second mass departure from Twitter/X. During the first one, the Fediverse – best known through its most popular implementation, Mastodon – saw a huge surge of users. This time, Bluesky is the one taking the popularity crown, gaining up to a million new signups every day (!).
Two years back, we looked into the architecture of Mastodon and pointed out a few challenges the network could face as it scales. The natural next move is to examine Bluesky more closely!
At the moment, the network is almost completely centralized: at first glance, it doesn’t differ much from Twitter/X. Practically all services are operated by one company. Bluesky, however, says its architecture is decentralized. That’s what we’ll concentrate on: the parts that could set Bluesky clearly apart from its rivals.
Is Bluesky built, at its core, in a way that ensures the network won’t end up like X 15 years from now? Or are we merely swapping one network for another under different management (even though Threads already occupies that niche)?
The origins of Bluesky
The company came into being in 2021 in a fairly unusual manner – backed by a $13m grant with no strings attached – from Twitter itself. That Bluesky is now regarded as an alternative to X may sound ironic, or perhaps this had been the intention of Jack Dorsey, Twitter’s CEO at the time, from the start. We may never find out!
Work on the underlying technology began earlier, in 2019, as a reaction to the following tweet:
The two-part series by Gergely Orosz describes the company’s early days, its development culture, and how its architecture evolved.
The Bluesky we use today has been under development since 2022; access was invite-only in 2023, and it opened to the public only this year. The project and its codebase are therefore still very young – and changing quickly. Shipping new features fast may be difficult, though. Given the recent influx of users, I’d guess most of the effort now goes into scaling rather than developing the app or the protocol. Then again, scaling problems like these are what every startup dreams of!
What it takes to build a social network
Should you set out to create a new microblogging platform from the ground up, the implementation would need to address several areas.
Naturally, a system can be divided in many ways, but as Bluesky is our subject, we’ll stick to its approach. The top-level components should therefore cover the following:
- user data storage: whatever users create (posts, likes, follows)
- authentication & authorization: how we prove to the service that “it’s really us”, our credentials, and the means of deciding what we’re allowed and not allowed to do in the system
- real-time streaming of new content: the “firehose”, which lets you process the newest posts right away
- moderation: the law demands it, but so do users – some users don’t want to see entire categories of content, and some content is just illegal
- feed generation: what ends up at the top of your feed? That’s the almighty “Algorithm”, which supposedly sways everything, elections included
- data aggregation: displaying a post may sound trivial for a social network, but the likes, reposts, engagements, etc. all have to be counted
X, Mastodon, Threads, and Bluesky do implement all of these, but in rather different ways.
How X is built
When we look at X’s architecture through the lens of centralization, the diagram is fairly straightforward:

X is entirely centralized. Naturally, this plain “X” box conceals tremendous complexity. To keep pace (quite successfully) with the volumes of data the network handles (or used to handle), Twitter’s engineers had to tackle, and frequently invent, completely new ways of scaling software.
Still, X has full control over your data, your identity on X, how content is moderated (a hot topic right now), and how it’s shown in a feed. The “Algorithm” is partially open-source; this aids transparency, but all you can do is live with that knowledge, with little chance of influencing how it works (unless, of course, you’re a close friend of Elon’s).
X, then, is a monolith. Is there a better way?
How Mastodon is built
Seen from our high-level, centralization-focused architectural perspective, the Mastodon/Fediverse network looks roughly like this:

Every Mastodon instance is, in a sense, a separate world. The server’s administrator – and thus the server’s software – sets the rules of participation and determines how the feed is built (out of the box there’s no “Algorithm” at all, only a chronological list of posts). The server instance holds user credentials, posts, and interactions, and takes care of moderation and queries (data aggregation) – everything bundled together.
The Fediverse architecture is frequently likened to email, where your email provider (the Mastodon server) holds your messages (posts). Communication happens peer-to-peer; no central post office is in charge of delivery. That works nicely for email, but for a social network it makes data aggregation difficult: no single global view of a post’s state exists, and that state includes replies, “favorites”, and boosts.
An email-like architecture leads straight to usability problems – for example, two users whose accounts live on different servers may see different reply threads under the same post! Decentralization has its price.
Speaking of email, it’s a decentralization success story, and Mastodon attempts to follow in its footsteps. Just as some email providers are enormous, some Mastodon instances are disproportionately large (mastodon.social being the largest). Even so, the network shows a spread of users across many servers. That’s also a win for Mastodon:
(we run our own instance too!)
This architecture results in some degree of server lock-in, which is frequently named as a weak point of Mastodon’s design: your identity is bound to a server, and moving to a different one is hard. Without the original server’s cooperation, it may even be impossible. So pick your Mastodon server carefully!
How Bluesky is built
At last, let’s turn to Bluesky itself! There are two ways to look at Bluesky’s architecture: as it’s used today and as it could be used in the future.
As for today’s Bluesky, for 99% of users a diagram focused on centralization would look rather familiar:

In other words, Bluesky (the company) controls your data, identity, feed generation, and data aggregation. If it pulled the plug, nearly the whole network would vanish.
One important caveat: an archive of your data could survive, since all activity on Bluesky is public and most likely scraped. You would not, however, be able to reclaim your identity and keep posting elsewhere. To be fair, the same applies if your Mastodon instance vanished (or X, for that matter).
In the introduction, though, we asked whether anything in Bluesky’s architecture makes it better able to withstand hostile takeovers and sets it apart from X or Threads.
This is where the 1% matters (the real figure is probably lower; I don’t have exact numbers). Bluesky’s architecture permits – perhaps even promotes – decentralization. It isn’t widely used that way yet, but the potential is there.
A revised architectural diagram that reflects the whole BlueSky network as it runs today (i.e., including the services operating independently) would look more like this:

Put differently: X is completely centralized, Mastodon is completely decentralized, and Bluesky sits somewhere between them.
“The organization is a future adversary”
This is how the Bluesky team sums up its approach: the people running Bluesky may be trustworthy today, but nobody knows what will become of the company later on.
Bluesky is a public benefit company, so making a profit isn’t its (sole) aim. Still, VC money is involved, and so are people, which means things could go either way. OpenAI illustrates this well: a company that’s now open in name only and has shifted from research to a fairly conventional for-profit business.
This mindset shows in how Bluesky is built and run. Nearly all of its components (apart from a single crucial one) are open-source. As with X’s Algorithm, that’s a great first step towards transparency. But we can go beyond that and self-host nearly the whole of Bluesky’s infrastructure, given enough spare time & money.
Bluesky’s components at a glance
Let’s sum up the parts of Bluesky’s architecture, grouped by the roles we outlined before.
| Role | Bluesky name | Open source? | Self-hosting cost |
|---|---|---|---|
| user data storage | PDS (Personal Data Server) | yes | low |
| authentication & authorization | PDS + PLC server (Public Ledger of Credentials) | yes | low |
| real-time streaming | Relay | yes | high |
| moderation | Labeler | yes | low to high |
| feed generation | Feed generator | yes | low to high |
| data aggregation | AppView | no | very high |
Simplified, the data flows like this:

User data storage
We’ll begin with the PDS servers. This is where your data resides: all your (public) activity, such as the posts you write, the accounts you follow, and your likes and blocks. A PDS also holds the private keys that sign your content, proving you’re its author.
What a PDS doesn’t hold (a fundamental difference from Mastodon) is any data about your followers or what they do with your posts; PDS servers don’t talk to each other peer-to-peer.
When you sign up for Bluesky, you get placed on a PDS run by Bluesky. Most users do exactly that. In particular, this means Bluesky holds the private keys mentioned above. By default, the company has full control.
Yet the PDS is also the simplest component to self-host, putting “own your data” into practice. It’s fairly cheap and needs little upkeep. Unless you (and perhaps a small group of others sharing your self-hosted PDS) post like crazy, such an instance will be a low-traffic web server, answering the odd HTTP request and passing the data along for aggregation.
It’s worth stressing that self-hosting a PDS server is far less complex than running a Mastodon instance. With Mastodon, you need to host the whole stack (data storage, aggregation, streaming, etc.). That binds your identity to the instance and costs more to operate.
In Bluesky, these roles are split into separate services (very much in the “microservices” spirit), so owning your data is a lot easier.
In fact, the Bluesky services run by Bluesky (the company) do ingest and aggregate data kept on self-hosted PDSs. I couldn’t find any figures on how many self-hosted PDSs exist, but I’ve seen people report that they’ve done it successfully.
Authentication & authorization
Identity on the web is an old problem that still lacks a definitively good answer (and maybe never will have one). Even so, Bluesky takes an interesting route by tying identity to domain names.
Its reasoning is that domain names are a well-known concept, readable by humans, and to some extent decentralized (though ICANN sits at the very top) – which is accurate and persuasive.
The mapping isn’t permanent, however: registering doesn’t bind you to one domain name for life. At first you get a [username].bsky.social subdomain. You can change it later thanks to an intermediate identifier based on the W3C DID (Decentralized Identifiers) standard.

Your domain name should resolve to a DID identifier, either via DNS records or via an https:// request to a well-known endpoint. That identifier is then looked up on a (Bluesky-run) PLC server holding a DID document. The DID document must point back to your domain name; a DID document counts as valid only once this circular link exists. Among other things, the DID document holds your public key (used to verify signatures) and your PDS server’s address.
A DID document can change, but every update has to be signed with your private key, which requires access to your PDS server. In addition, the DID identifier is a hash of the original (root) document. As a result, you get a chain of DID document updates that anyone can check (with the public keys). You can think of it as your own personal “mini-blockchain.”
For instance, a DID such as did:plc:… is stored as a DNS TXT record on your domain. Requesting it from the PLC directory returns your current DID document, which refers back to example.com and to your Bluesky-managed PDS, for example https://<server>.host.bsky.network. Your Bluesky profile is then tied to that domain name.
With this architecture, switching to a different display name (domain name) is fairly painless. This holds even if you’ve lost control of your old domain name – “all” you need is control of the signing key in the PDS, either directly or via Bluesky’s custody. That’s another major difference from Mastodon.
The single central component with a key role here is the PLC server, run by Bluesky, which maps DID identifiers to DID documents. It could be viewed as a single point of failure, but two important caveats apply. First, all the data is public and can be verified independently. So if anyone tampers with it, the community could spot it quickly (which reportedly has already happened, when certain records were deleted for legal reasons).
Second, any tampering with the public ledger other than removing records would be easy for third parties to detect (as long as Bluesky doesn’t hold the private keys, which is the situation today). So although the system isn’t perfect, it provides good transparency and room for future improvements: adding mirrored PLC servers, handing the upkeep of the public directory to an independent entity, or perhaps this is (at last!) a fitting use case for a private blockchain.
Critics of how Bluesky handles identity management note (among other things) that the solution is centralized for two reasons: it depends on DNS and on a single PLC server instance. That’s correct – Mastodon’s design is more decentralized, but at a considerable cost to user experience.
With Mastodon, you genuinely own your identity (and server); as long as someone sells you Internet access, you can post on your (private) Mastodon instance. With Bluesky, it’s conceivable that, say, a future government could bar you from getting a domain name, leaving you unable to keep an identity on Bluesky’s network.
Real-time streaming
The Relay service collects real-time data from every PDS (over WebSockets) and publishes it as a “firehose.” As the network expands, this piece of software will grow increasingly complex and costly in terms of compute, distribution, and the bandwidth required to run it.
Several downstream components, covered next and responsible for Bluesky’s core functionality, then consume the firehose.
Right now, Bluesky (the company) runs the only relay, but in principle there could be several. Also in principle, Bluesky would allow such a third-party relay to consume all the data from the PDSs it hosts. Yet it’s just as easy to picture Bluesky charging for this (even if only to cover egress costs) or cutting off potential competitors from the data.
All of this is, of course, speculative and lies ahead; for now Bluesky behaves as an open, trustworthy company, but we must remember the “organization is a future adversary” motto.
Labelers & feed generators
Among the firehose’s consumers are the Labeler & Feed Generator services. The former attaches labels to posts – content warnings, flags set manually by moderators, or anything else. Labeling may be done by a person or by an AI. The next component in the pipeline, responsible for data aggregation (covered in the following section), then consumes these labels.
Likewise, a Feed Generator consumes the firehose and produces feeds – that’s the “Algorithm.” For a given user, the service builds the feed, which might be plain chronological order, popular posts, posts on a specific topic, or even a fixed set of posts. Here too, how the feed is put together is up to the implementer – anywhere from manual to AI-powered.
These two components can run – and already do run – independently of those Bluesky operates. Bluesky ships some ready-made labelers (some configurable, some not), but you can subscribe to others as well. The same goes for feed generators: “Popular With Friends” is run by Bluesky (the company), but plenty of others exist.
Building your own Labeler is fairly simple and boils down to hosting a web service. But should your labeler become especially popular, running it could get rather costly! A few popular existing labelers can be found here:
Data aggregation
At last we reach the biggest and most crucial component: the AppView. This is where the combined data from the Relay (and thus from every PDS), Labelers, and Feed Generators gets stored.
AppView’s job is to aggregate all incoming data into what you eventually see in your Bluesky feed and when opening individual posts. This is where posts are arranged into threads, likes and reposts are counted, and part of the moderation is applied (some individual moderation settings are also applied on the PDS, which serves as a proxy when a feed is accessed). AppView also works out how many followers you have – since that information is scattered across the records of the followers’ PDSs.
It’s also the most data-heavy component and the hardest one to scale. This is where NoSQL databases, search clusters, real-time data pipelines, and similar technologies come in. At present it’s also the only component that isn’t open-source – though there are plans to change that. Or perhaps to at least split more functionality out into separate services, as was done with Labelers and Feed Generators?
At the moment, just one AppView instance is running. However – nothing prevents you from building your own! Provided there are Relays that let you consume the data, you could build one that aggregates data however you like. The ideal architecture of a federated network of services built on Bluesky’s architecture, with full-fledged third-party participants, is described in the paper by Martin Kleppmann and the Bluesky team:
Mastodon resembles email, Bluesky resembles the web
Whereas Mastodon’s architecture is commonly described as email-inspired, Bluesky’s architecture resembles the web. PDSs play the role of individual web servers hosting web pages. Anybody can run a web server with some pages, and in the same way anybody can run a PDS with some records (posts, likes, follows). Whether anyone knows that this web server/PDS exists and consumes its content is a separate matter!
So we have PDSs (web servers) and posts (web pages). What, then, are Relays and AppViews? Google! Or, more precisely, search engines indexing the web’s content. Just as Google or Bing make your content findable by the world, Bluesky the company fills a comparable role – it indexes the content of every PDS and makes it public and searchable.
There is, however, one major difference in today’s picture. Translating Bluesky’s current component setup into web terms, we’d get a single search engine that indexes the whole web while also hosting every web page! It’s a heavily lopsided setup.
So, is Bluesky any different from Twitter?
Technically speaking, the architecture is in place for Bluesky to differ substantially from Twitter/X. For that to actually happen, though, a range of social and business factors have to line up. Any progress here is only possible with Bluesky’s (the company’s) full cooperation.
One way to reduce today’s centralization would be to further decouple data ownership from data indexing – in web terms, to separate web hosting from web indexing. We wouldn’t want an Internet entirely controlled by Google – not because Google is evil, but simply for the sake of a healthy ecosystem. The same holds here.
Ideally, third-party services would appear as alternatives to PDS hosting run by Bluesky. But moving your PDS from one provider to another would have to be close to effortless, built right into the Bluesky app’s UI. I’m not sure Bluesky (the company) has the incentive to do this (from a strictly business standpoint).
Moreover, we can speak of decentralization only once there are at least two large Relay / AppView implementations. The technical means exist, but what use are they if nobody uses them? Mind you, simply having another Relay / AppView isn’t enough: such a service has to attract a large number of users to be a real alternative to Bluesky – large enough that it can’t be ignored and can’t be cut off from data at the flick of a switch by some future owner of Bluesky.
It’s a challenge for the community, but not an insurmountable one. There are many open-source projects waiting to be built and many business models waiting to be found, since operating a Twitter-like service is costly.
Making all of this happen would align with Bluesky’s “credible exit” aim. The company and its team openly admit that things are fairly centralized at present, but their declared development goal is to offer a way to leave Bluesky, taking your identity and data with you, should the company go under.
What the Bluesky team has done so far – splitting functionality into services with clearly defined roles (PDS, Labeler, Feed Generator, Relay) that can run independently of Bluesky’s main infrastructure, and keeping these promises – inspires confidence. Still, we should remember that if we really want a better alternative to Twitter/X, we must be prepared for the company to undergo a hostile takeover 15 years from now.
The bigger picture
There’s one more reason Bluesky deserves attention. It’s just one “social mode” and one application built on the AT Protocol (Authenticated Transfer). The protocol’s ambitions reach far beyond microblogging: it offers a means to establish and maintain an online identity (DIDs and DNSs) and to publish authenticated data on the web (via signed PDS records).
Much like the web, whose fundamental building block is the hyperlink, here we get a vast ocean of signed AT Proto records that point to one another via AT Proto URIs.
Particularly in the era of generative AI, being able to verify that a given person or organization produced certain data may be worth more than ever.
Sources
Should you want to dig deeper into Bluesky, these are the articles I relied on:
- Building Bluesky: a Distributed Social Network: a short history of Bluesky and an outline of its architecture
- Inside Bluesky’s Engineering Culture: a look at how engineering works at Bluesky. The team still counts only 15 engineers!
- Bluesky and the AT Protocol – a video overview: Martin Kleppmann himself presenting Bluesky and the AT Protocol it’s built on
- Bluesky and the AT Protocol: Usable Decentralized Social Media: the paper referred to above
- How decentralized is Bluesky really?: an in-depth critique by an ActivityPub developer (the protocol Mastodon uses), scrutinizing Bluesky’s claims about decentralization and federation
- Reply on Bluesky and Decentralization: an answer to the piece above from an AT Protocol developer, offering a different perspective on decentralization and federation
- Progress on atproto Values and Value Proposition: the principles guiding Bluesky’s development and how far their implementation has come