Bluesky isn't just another social network—it's built on the ATProtocol, a federated architecture designed for decentralization. Understanding how the pieces fit together helps you build better applications and appreciate why Bluesky is fundamentally different from centralized platforms.
This guide explains the core components of ATProtocol's federation architecture: Personal Data Servers, Relays, AppViews, Feed Generators, and Labelers.
The Big Picture: Federated Architecture
ATProtocol uses a "big world with small world fallbacks" design philosophy. The goal is network-wide indexing and discoverability while still allowing independent operation.
Here's how data flows through the system:
- Users create content on their PDS (Personal Data Server)
- Relays crawl PDSs and aggregate data into a firehose stream
- AppViews consume the firehose and build user-facing features
- Feed Generators create custom algorithmic feeds
- Labelers apply content labels for moderation
- Clients (like Skyscraper) display it all to users
Each component can be operated independently, creating a resilient, censorship-resistant network.
Personal Data Server (PDS)
The PDS is your personal agent on the network. It's where your identity and data live.
What a PDS Does
- Hosts your repository - All your posts, likes, follows, and other records
- Manages your account - Login, authentication, and session handling
- Controls your signing key - Cryptographic proof of your identity
- Stores private data - DMs, muted words, and other non-public information
- Serves your data - Responds to requests from Relays and other services
Hosted vs. Self-Hosted
Most Bluesky users use Bluesky's hosted PDS (bsky.social). But you can also:
- Self-host your own PDS - Full control over your data
- Use a third-party provider - Independent hosting services
- Migrate between PDSs - Move your account without losing your identity
Your DID (Decentralized Identifier) stays the same regardless of which PDS hosts your data. This is what makes true account portability possible.
PDS Benefits
- Data ownership - You control where your data lives
- Censorship resistance - No single point of control
- Portability - Move your account, keep your followers
- Privacy options - Self-host for maximum privacy
Relay
The Relay is the aggregation layer that makes network-wide features possible.
What a Relay Does
- Crawls the network - Connects to PDSs and fetches new data
- Aggregates everything - Combines data from all sources
- Outputs a firehose - Streaming feed of all network activity
- Enables discovery - Makes content findable across the network
Types of Relays
- Full-network Relays - Index everything (like Bluesky's main Relay)
- Partial-network Relays - Focus on specific communities or topics
- Private Relays - Serve specific applications or organizations
Multiple Relays can coexist, providing redundancy and allowing different services to build on the same network data.
Why Relays Matter
Without Relays, every client would need to connect to every PDS individually—an impossible task at scale. Relays solve this by:
- Reducing PDS load - PDSs serve Relays, not millions of clients
- Improving discoverability - Content is findable beyond your immediate network
- Enabling global features - Search, trending topics, and more
- Providing redundancy - Multiple Relays can serve the same data
AppView
AppViews are the application logic layer that turns raw data into user features.
What an AppView Does
- Consumes the firehose - Subscribes to Relay data streams
- Indexes content - Builds searchable databases
- Assembles feeds - Creates the timeline you see in the app
- Provides API endpoints - Serves data to client applications
- Aggregates data - Counts likes, follows, and other metrics
Bluesky's AppView
Bluesky operates an AppView that powers the main Bluesky experience. It:
- Provides the
api.bsky.appendpoints - Indexes all posts for search
- Calculates engagement metrics
- Serves the Following and Discover feeds
Custom AppViews
Because ATProtocol is open, anyone can build their own AppView to:
- Create alternative social experiences
- Build specialized applications (photo sharing, long-form content, etc.)
- Serve specific communities or regions
- Implement different content policies
Feed Generators
Feed Generators create custom algorithmic feeds—one of Bluesky's most powerful features.
How Feed Generators Work
- Subscribe to the firehose - Receive all network activity
- Apply custom logic - Filter, sort, and curate content
- Serve feed requests - Return ordered lists of posts
- Users subscribe - Add custom feeds to their experience
What You Can Build
- Topic feeds - Posts about specific subjects
- Language feeds - Content in specific languages
- Community feeds - Curated for specific groups
- Algorithmic feeds - Engagement-based or ML-powered
- Moderated feeds - With specific content policies
At Skyscraper, we built our trending hashtags service by processing the firehose to track hashtag popularity—a feature that wouldn't be possible without this open architecture.
Labelers
Labelers provide stackable moderation for the network.
How Labelers Work
- Apply labels to content - Mark posts or accounts with metadata
- Labels are informational - They describe content, they don't hide it
- Users subscribe to labelers - Choose whose labels to trust
- Clients enforce labels - Display warnings, blur content, or hide entirely
Types of Labels
- Content warnings - Adult content, violence, etc.
- Misinformation flags - Fact-checking labels
- Spam indicators - Bot or spam account markers
- Custom categories - Community-specific labels
Why Stackable Moderation Matters
Unlike centralized platforms where one company makes all moderation decisions, ATProtocol allows:
- User choice - Subscribe to labelers you trust
- Competing moderation - Different labelers for different communities
- Transparency - Labels are visible, not hidden rules
- Appeal options - Switch labelers if you disagree
How It All Connects
Let's trace a post through the system:
- You write a post in Skyscraper (or any client)
- Client sends it to your PDS via the ATProtocol API
- PDS stores it in your repository and signs it with your key
- Relay crawls your PDS and adds the post to the firehose
- AppView indexes the post for search and feeds
- Feed Generators evaluate it for inclusion in custom feeds
- Labelers may apply labels based on their criteria
- Other users see your post via their clients
Each step involves different services that can be operated by different entities, creating a truly decentralized system.
Building on ATProtocol
As a developer, you can interact with ATProtocol at multiple levels:
Client Applications
Build apps that connect to existing infrastructure:
- Use the AppView API for user features
- Authenticate via OAuth or app passwords
- Create posts, follows, and other records
Feed Generators
Create custom feeds:
- Subscribe to the Relay firehose
- Implement your feed algorithm
- Serve a feed generator endpoint
Infrastructure Services
Run your own infrastructure:
- Self-host a PDS for yourself or others
- Operate a specialized Relay
- Build a custom AppView
- Run a labeling service
Why Federation Matters
ATProtocol's federated architecture provides benefits that centralized platforms can't:
- No single point of failure - The network survives if any component goes down
- User data ownership - You control where your data lives
- Account portability - Move without losing your identity
- Innovation freedom - Anyone can build new components
- Censorship resistance - No central authority to silence users
- Competition - Multiple providers can serve the network
Getting Started
Ready to build on ATProtocol? Here's where to start:
- ATProtocol Tutorial for Beginners - Build your first app
- OAuth Implementation Guide - Authenticate users securely
- Rate Limits Guide - Understand API limits
- Facets Guide - Handle rich text correctly
Frequently Asked Questions
What is a PDS?
A Personal Data Server hosts your user repository, manages your account, handles authentication, and stores your private data. It's your agent on the ATProtocol network.
What is a Relay?
A Relay crawls the network, aggregates data from PDSs, and outputs a streaming firehose that downstream services use to build features.
What is an AppView?
An AppView consumes Relay data and creates user-facing features—assembling feeds, indexing content, and providing API endpoints for client apps.
Can I self-host Bluesky?
Yes! You can run your own PDS and participate in the federated network while maintaining full control of your data.
What are Feed Generators?
Services that create custom algorithmic feeds by subscribing to the firehose, applying their own logic, and serving curated post lists to subscribers.