Skip to content

RFC: Server Architecture Refactor for Horizontal Scalability and Bottleneck Elimination #24

@zoedsoupe

Description

@zoedsoupe

RFC: Server Architecture Refactor for Horizontal Scalability and Bottleneck Elimination

TL;DR

This RFC proposes eliminating the single Base server bottleneck by introducing a session-centric architecture with pluggable registry support for both local and distributed deployments.

Problem Statement

Current architecture has several critical bottlenecks identified in production:

Proposed Solution

Session-Centric Architecture

Replace the heavy Base server with:

  1. Lightweight Router: Stateless request routing
  2. Session-Based Processing: Sessions handle their own requests directly
  3. Pluggable Registry: Support ETS for default/local implementation and extensibility for distribution (like horde) or even external storages for sessions (like redis)
  4. Async Request Processing: Eliminate blocking operations

Key Benefits

  • Eliminate bottlenecks: No more single-process serialization
  • Horizontal scaling: Sessions distribute across cluster nodes
  • Backward compatibility: Zero or minimal number of breaking changes to public API

Architecture Diagrams

Current vs Proposed Request Flow

Current (Bottleneck):

Client → Transport (bottleneck) → Base Server (bottleneck) → Session → Handler
           ↑ All requests routed here    ↑ All requests serialized here

Proposed (Distributed):

Client → Transport → Router → Session → Handler (async)
                        ↑ Lightweight routing only
                                ↑ Direct processing per session

Community Input Needed

  1. Architecture feedback: Does the session-centric approach make sense?
  2. Registry design: ETS vs Horde trade-offs and alternatives?
  3. Migration concerns: Any deployment scenarios we should consider?
  4. Performance priorities: What metrics matter most to your use case?
  5. Distribution needs: How do you currently handle clustering/scaling?

Let's discuss! 🚀 so for that im asking for the original issues authors: @byu @feng19

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions