分形簇
Fractal Cluster

原始链接: https://hasen.dev/fractal-cluster/

理想的 Web 服务器是一个自包含的二进制文件,内嵌 HTTP 处理、前端资源、缓存、数据库、文件服务和任务队列。为了水平扩展,相同的二进制文件会变为对等节点感知,协调分片数据和分布式任务队列,同时每个节点仍是一个完整的应用服务器;节点加入或离开时,数据会动态重新平衡。这避免了由 12 个以上独立系统组成的常规技术栈,以及连接、版本管理和维护基础设施的沉重运维负担。相反,应用逻辑保持精简,而编排逻辑被编译进程序中。增加容量意味着把一个二进制文件复制到另一台 VPS,将其指向一个对等节点,然后让集群吸收它。结果是一个分形集群:一个可执行文件,内嵌分片数据库、对等复制、分布式队列、实时发布/订阅和内置 blob 存储。

相关文章

原文

The ideal web server is a single self-contained binary that embeds the full stack — HTTP handling, frontend assets, caching, database, file serving, and job queues.

1. One Full-Stack Binary everything in-process

Client Browser HTTP resp ./app single static executable HTTP Server routing + streaming Static & Media frontend + blobs App Logic handlers + auth RAM Cache in-process speed Embedded DB structured storage Job Queue background tasks

To scale horizontally, we make that binary peer-aware so instances coordinate sharded data and distributed job queues among themselves — while each instance remains a complete, self-contained application server.

2. Collaborating Peer Cluster same binary on every server

incoming requests to any node ./app (Node 1) full-stack binary ./app (Node 2) full-stack binary ./app (Node 3) full-stack binary peer links: sharded reads · mirrored writes

Data is dynamically rebalanced whenever instances join or leave the cluster.

Interactive Cluster Simulator

60 virtual shards (R=2). Add nodes, drain cleanly, kill a node mid-flight, or step through reads and writes.

Why build it this way?

Most "scalable" architectures spend more effort operating databases, caches, queues, and orchestrators than running application code. Making the app peer-aware collapses the stack back to one moving part.

Conventional "Scalable" Stack 12+ systems

Docker / Containers Kubernetes Istio / Service Mesh Ingress / Envoy Postgres Cluster Redis Kafka / RabbitMQ S3 / Object Store Terraform Helm / ArgoCD Cert-Manager YAML + Glue

Your application logic is small, yet most of your engineering time goes to keeping external infrastructure wired together, versioned, and alive.

联系我们 contact @ memedata.com