Architecture of Mastodon

Architecture of Mastodon

The Architecture of Mastodon

  • Ruby on Rails Web App
  • PostgreSQL Persistence Layer
  • Agnostic S3/ File Storage and Mailer
  • Redis for Precomputed Social Feed Cache and Worker Queue
  • Sidekiq for Background Processing
  • Node Handler for Streaming (Notifications, New posts, etc.)
  • Problems
    • Rails does not have declarative components.
    • Rails is harder to scale.
    • Rails is hard to serve at the edge. can host static assets, but templates in the core RoR process render most pages.
    • All of these make developer workflow harder. Containerization, Kubernetes, and modern stacks are challenging to work with in Rails.
Backlinks2