Deploy
$99/mo
Join waitlistSingle-node vector map
A managed single-node block stack connected to one vector map node in the cloud environment you choose.
Included features
Mission Statement
Microstacks is a general purpose distributed operating system based on the Unix philosophy. It composes a distributed system as a hierarchical structure of dependencies that can be deployed and scaled across heterogeneous computing infrastructure as one system. This enables federated deployment, which lets one system run across infrastructure owned by different organizations, and vector scaling, which lets it grow across any infrastructure without reconfiguration.
Swipe sideways to compare columns
Frameworks
MonolithicArchitecture
StaticStructure
CentralizedDeployment
VerticalScaling
Microstacks
ModularArchitecture
Orchestrators
MicroserviceArchitecture
DynamicStructure
DistributedDeployment
HorizontalScaling
A Block Stack represents a distributed system as a hierarchical structure
of dependencies. map defines the entry-point of the system via a
router, mount adds frontend dependencies as components, and
import adds backend dependencies as services. Their paths preserve
the complete relationship as one cohesive system structure.
# Compose the WordPress Block Stack $ stack map \ caddy:2 wordpress \ -- caddy reverse-proxy --from :80 --to http://127.0.0.1:80 $ stack mount \ wordpress:7.0.2 wordpress/ $ stack import \ --env=MYSQL_RANDOM_ROOT_PASSWORD=yes \ mysql:9.7.1 wordpress/mysql # Inspect the resulting hierarchy $ stack ls -r wordpress TYPE IMAGE HASH BLOCK ROUTER caddy:2 1870a829d9bc wordpress COMPONENT wordpress:7.0.2 557e43b64eeb wordpress/ SERVICE mysql:9.7.1 530b65b2197a wordpress/mysql
Federated deployment allows each dependency to be deployed to any node across
any data center. The example below deploys WordPress and
snaps Caddy, WordPress, and MySQL to different nodes
while preserving them as one cohesive system.
# Stage the Block Stack as a Vector Map $ stack deploy wordpress wordpress.microstacks.local --stage Vector map staged: wordpress.microstacks.local # Place each dependency on its selected node $ stack snap wordpress.microstacks.local wordpress-router Vector snapped: wordpress.microstacks.local $ stack snap wordpress.microstacks.local/1 wordpress-node Vector snapped: wordpress.microstacks.local/1 $ stack snap wordpress.microstacks.local/mysql/1 database-node Vector snapped: wordpress.microstacks.local/mysql/1 # Inspect the deployed Vector Map $ stack ps -r wordpress.microstacks.local TYPE IMAGE NODE NODEIP STATUS UPTIME VECTOR ROUTER caddy:2 wordpress-router 10.45.0.1 running 1m wordpress.microstacks.local COMPONENT wordpress:7.0.2 wordpress-node 10.45.0.2 running 1m wordpress.microstacks.local/1 SERVICE mysql:9.7.1 database-node 10.45.0.3 running 1m wordpress.microstacks.local/mysql/1
Vector scaling adds capacity by adding a new vector to any dependency
without changing the stack topology. In the example below,
scale stages another WordPress component vector;
snap selects its node while the hierarchy and virtual dependency
addresses remain unchanged.
# Stage another WordPress vector $ stack scale wordpress.microstacks.local/ --stage Vector staged: wordpress.microstacks.local/2 # Place it on another node $ stack snap wordpress.microstacks.local/2 application-node-2 # Inspect the scaled Vector Map $ stack ps -r wordpress.microstacks.local TYPE IMAGE NODE NODEIP STATUS UPTIME VECTOR ROUTER caddy:2 wordpress-router 10.45.0.1 running 3m wordpress.microstacks.local COMPONENT wordpress:7.0.2 wordpress-node 10.45.0.2 running 3m wordpress.microstacks.local/1 COMPONENT wordpress:7.0.2 application-node-2 10.45.0.4 running 1m wordpress.microstacks.local/2 SERVICE mysql:9.7.1 database-node 10.45.0.3 running 3m wordpress.microstacks.local/mysql/1
A complete WordPress Block Stack deployed to wordpress.microstacks.local. Map Caddy as the router, mount WordPress at the root path, import MySQL, and deploy the full stack as a running Vector Map.
# Map Caddy as the router for the WordPress Block Stack
$ stack map \
caddy:2 wordpress \
-- caddy reverse-proxy --from :80 --to http://127.0.0.1:80
# Mount WordPress at the root path
$ stack mount \
wordpress:7.0.2 wordpress/
# Import MySQL under /mysql
$ stack import \
--env=MYSQL_RANDOM_ROOT_PASSWORD=yes \
mysql:9.7.1 wordpress/mysql
# Deploy the complete stack as a running Vector Map
$ stack deploy wordpress wordpress.microstacks.local
# Inspect the running WordPress Vector Map
$ stack ps -r wordpress.microstacks.local
TYPE IMAGE NODE NODEIP STATUS UPTIME VECTOR
ROUTER caddy:2 microstacks 10.45.0.1 running 1m wordpress.microstacks.local
COMPONENT wordpress:7.0.2 microstacks 10.45.0.1 running 1m wordpress.microstacks.local/1
SERVICE mysql:9.7.1 microstacks 10.45.0.1 running 1m wordpress.microstacks.local/mysql/1A local AI workspace mapped to open-webui.microstacks.local. Map Traefik as the router, mount Open WebUI, import Ollama, then run a root-level model block that pulls the model through the linked Ollama service.
# Map Traefik as the router for the Open WebUI domain
$ stack map \
--arguments=--providers.docker=true \
--label 'traefik.http.routers.default.rule=PathPrefix(`/`)' \
--label 'traefik.http.services.default.loadbalancer.server.url=http://127.0.0.1:80' \
traefik:v3.4 open-webui
# Mount Open WebUI at the root path
$ stack mount \
--env OLLAMA_BASE_URL=http://127.0.0.1:11434 \
ghcr.io/open-webui/open-webui:v0.6.25 \
open-webui/
# Import Ollama with its default server command
$ stack import \
--env GODEBUG="tlsmlkem=0" \
ollama/ollama:0.32.5 \
open-webui/ollama
# Add the qwen2.5-0.5b model job at the root path
$ stack import \
--no-restart \
--mask 11434/tcp \
--require 127.0.0.1:11434 \
--env GODEBUG="tlsmlkem=0" \
ollama/ollama:0.32.5 \
open-webui/qwen2.5-0.5b -- \
ollama pull qwen2.5:0.5b
# Link Ollama into the model address space
$ stack import \
open-webui/ollama \
open-webui/qwen2.5-0.5b/ollama
# Deploy the Open WebUI stack
$ stack deploy open-webui open-webui.microstacks.local
# Inspect the running Open WebUI Vector Map
$ stack ps -r open-webui.microstacks.local
TYPE IMAGE NODE NODEIP STATUS UPTIME VECTOR
ROUTER traefik:v3.4 microstacks 10.45.0.1 running 1m open-webui.microstacks.local
COMPONENT ghcr.io/open-webui/open-webui:v0.6.25 microstacks 10.45.0.1 running 1m open-webui.microstacks.local/1
SERVICE ollama/ollama:0.32.5 microstacks 10.45.0.1 running 1m open-webui.microstacks.local/ollama/1
SERVICE ollama/ollama:0.32.5 microstacks 10.45.0.1 completed 1m open-webui.microstacks.local/qwen2.5-0.5b/1A Redis replica set stack mapped to redis.rs.microstacks.local. Map Caddy as the router, mount RedisInsight, import Redis with instance-aware replica configuration, clone the Redis service block, then deploy and scale the replica vectors.
# Map Caddy as the router for the Redis replica set domain
$ stack map caddy:2 redis.rs -- \
caddy reverse-proxy --from :80 --to 127.0.0.1:80
# Mount RedisInsight at the root path
$ stack mount \
redis/redisinsight:3.8.0 \
redis.rs/
# Import Redis with instance-aware primary/replica configuration
$ stack import \
--env 'N=${INSTANCE#1}' \
redis:8.8.1 \
redis.rs/redis -- \
redis-server \
'${N:+--replicaof}' '${N:+127.0.0.1}' '${N:+6379}'
# Clone the Redis service block under itself
$ stack import \
redis.rs/redis \
redis.rs/redis/redis
# Deploy RedisInsight and scale the Redis replica vectors
$ stack deploy redis.rs redis.rs.microstacks.local
$ stack scale redis.rs.microstacks.local/redis=3
# Inspect the running Redis replica set Vector Map
$ stack ps -r redis.rs.microstacks.local
TYPE IMAGE NODE NODEIP STATUS UPTIME VECTOR
ROUTER caddy:2 microstacks 10.45.0.1 running 1m redis.rs.microstacks.local
COMPONENT redis/redisinsight:3.8.0 microstacks 10.45.0.1 running 1m redis.rs.microstacks.local/1
SERVICE redis:8.8.1 microstacks 10.45.0.1 running 1m redis.rs.microstacks.local/redis/1
SERVICE redis:8.8.1 microstacks 10.45.0.1 running 1m redis.rs.microstacks.local/redis/2
SERVICE redis:8.8.1 microstacks 10.45.0.1 running 1m redis.rs.microstacks.local/redis/3A Redis cluster stack mapped to redis.cluster.microstacks.local. Map Caddy as the router, mount RedisInsight at the root path, import Redis with cluster ports, clone the Redis service block, then deploy and scale the cluster vectors.
# Map Caddy as the router for the Redis domain
$ stack map caddy:2 redis.cluster -- \
caddy reverse-proxy --from :80 --to 127.0.0.1:80
# Mount RedisInsight at the root path
$ stack mount \
--env RI_REDIS_HOST=127.0.0.1 --env RI_REDIS_PORT=6379 \
redis/redisinsight:3.8.0 \
redis.cluster/
# Import the first Redis cluster node
$ stack import \
--endpoint 16379/tcp \
redis:8.8.1 \
redis.cluster/redis -- \
redis-server --cluster-enabled yes --appendonly yes --cluster-announce-ip \${BIND_ADDR}
# Clone the Redis service block under itself
$ stack import \
redis.cluster/redis \
redis.cluster/redis/redis
# Mount a config job to create the Redis cluster
$ stack mount \
--no-restart \
--require 127.0.0.{1..6}:6379 \
redis:8.8.1 \
redis.cluster/config -- \
redis-cli --cluster create 127.0.0.{1..6}:6379 --cluster-replicas 1 --cluster-yes
# Link Redis into the config address space
$ stack import \
redis.cluster/redis \
redis.cluster/config/redis
# Deploy RedisInsight and scale the Redis cluster vectors
$ stack deploy redis.cluster redis.cluster.microstacks.local
$ stack scale redis.cluster.microstacks.local/redis=6
# Inspect the running Redis cluster Vector Map
$ stack ps -r redis.cluster.microstacks.local
TYPE IMAGE NODE NODEIP STATUS UPTIME VECTOR
ROUTER caddy:2 microstacks 10.45.0.1 running 1m redis.cluster.microstacks.local
COMPONENT redis/redisinsight:3.8.0 microstacks 10.45.0.1 running 1m redis.cluster.microstacks.local/1
COMPONENT redis:8.8.1 microstacks 10.45.0.1 completed 1m redis.cluster.microstacks.local/config/1
SERVICE redis:8.8.1 microstacks 10.45.0.1 running 1m redis.cluster.microstacks.local/redis/1
SERVICE redis:8.8.1 microstacks 10.45.0.1 running 1m redis.cluster.microstacks.local/redis/2
SERVICE redis:8.8.1 microstacks 10.45.0.1 running 1m redis.cluster.microstacks.local/redis/3
SERVICE redis:8.8.1 microstacks 10.45.0.1 running 1m redis.cluster.microstacks.local/redis/4
SERVICE redis:8.8.1 microstacks 10.45.0.1 running 1m redis.cluster.microstacks.local/redis/5
SERVICE redis:8.8.1 microstacks 10.45.0.1 running 1m redis.cluster.microstacks.local/redis/6A MongoDB replica set stack mapped to mongo.rs.microstacks.local. Map Caddy as the router, mount Compass Web, import MongoDB with replica set mode, clone the Mongo service block, and initialize the replica set from a config job.
# Map Caddy as the router for the MongoDB replica set domain
$ stack map caddy:2 mongo.rs -- \
caddy reverse-proxy --from :80 --to 127.0.0.1:80
# Mount Compass Web at the root path
$ stack mount \
--require 127.0.0.1:27017 \
--env 'CW_MONGO_URI=mongodb://1.localhost:27017,2.localhost:27017,3.localhost:27017/?replicaSet=rs0' \
haohanyang/compass-web \
mongo.rs/
# Import MongoDB with replica set mode enabled
$ stack import \
mongo:8.3.7 \
mongo.rs/mongo -- \
mongod --replSet rs0 --bind_ip '${INSTANCE}.localhost'
# Clone the MongoDB service block under itself
$ stack import \
mongo.rs/mongo \
mongo.rs/mongo/mongo
# Run a config job to initialize the replica set
$ stack import \
--no-restart \
--require 127.0.0.{1..3}:27017 \
alpine/mongosh:latest \
mongo.rs/config -- \
mongosh --host 1.localhost --eval 'rs.initiate({_id:"rs0",members:[{_id:0,host:"1.localhost:27017"}]}); while (!db.hello().isWritablePrimary) { sleep(1000); }; rs.add("2.localhost:27017"); rs.add("3.localhost:27017"); rs.status()'
# Link MongoDB into the config address space
$ stack import \
mongo.rs/mongo \
mongo.rs/config/mongo
# Deploy Compass Web and scale the MongoDB replica vectors
$ stack deploy mongo.rs mongo.rs.microstacks.local
$ stack scale mongo.rs.microstacks.local/mongo=3
# Inspect the running MongoDB replica set Vector Map
$ stack ps -r mongo.rs.microstacks.local
TYPE IMAGE NODE NODEIP STATUS UPTIME VECTOR
ROUTER caddy:2 microstacks 10.45.0.1 running 1m mongo.rs.microstacks.local
COMPONENT haohanyang/compass-web microstacks 10.45.0.1 running 1m mongo.rs.microstacks.local/1
SERVICE mongo:8.3.7 microstacks 10.45.0.1 running 1m mongo.rs.microstacks.local/mongo/1
SERVICE mongo:8.3.7 microstacks 10.45.0.1 running 1m mongo.rs.microstacks.local/mongo/2
SERVICE mongo:8.3.7 microstacks 10.45.0.1 running 1m mongo.rs.microstacks.local/mongo/3
SERVICE alpine/mongosh:latest microstacks 10.45.0.1 completed 1m mongo.rs.microstacks.local/config/1
A sharded MongoDB cluster mapped to mongo.cluster.microstacks.local. Map Caddy as the router, mount Compass Web, define query, config, and shard blocks, wire their address spaces, and deploy the Vector Map.
# Map Caddy as the router for the MongoDB cluster domain
$ stack map caddy:2 mongo.cluster -- \
caddy reverse-proxy --from :80 --to 127.0.0.1:80
# Mount Compass Web at the root path
$ stack mount \
--require 127.0.0.1:27017 \
--env 'CW_MONGO_URI=mongodb://127.0.0.1:27017' \
--http-port 8080 \
haohanyang/compass-web \
mongo.cluster/ -- \
compass-web --host 0.0.0.0
# Import the mongos query router
$ stack import \
--require 127.0.0.{1..3}:27019 \
mongo:8.3.7 \
mongo.cluster/query -- \
mongos --configdb cfg/127.0.0.1:27019,127.0.0.2:27019,127.0.0.3:27019 --bind_ip '${INSTANCE}.microstacks'
# Import the config server replica set
$ stack import \
--mask 27017/tcp \
--endpoint 27019/tcp \
mongo:8.3.7 \
mongo.cluster/query/config -- \
mongod --configsvr --replSet cfg --bind_ip '${INSTANCE}.microstacks'
# Import shard0
$ stack import \
--mask 27017/tcp \
--endpoint 27018/tcp \
mongo:8.3.7 \
mongo.cluster/query/shard0 -- \
mongod --shardsvr --replSet shard0 --bind_ip '${INSTANCE}.microstacks'
# Import shard1
$ stack import \
--mask 27017/tcp \
--endpoint 27028/tcp \
mongo:8.3.7 \
mongo.cluster/query/shard1 -- \
mongod --shardsvr --replSet shard1 --bind_ip '${INSTANCE}.microstacks' --port 27028
# Initialize config and shard replica sets
$ stack import \
--no-restart \
--require 127.0.0.{1..3}:27019 \
--require 127.0.0.{1..2}:27018 \
--require 127.0.0.{1..2}:27028 \
alpine/mongosh:latest \
mongo.cluster/init -- \
mongosh --nodb --quiet --eval \
'new Mongo("127.0.0.1:27019").getDB("admin").runCommand({replSetInitiate:{_id:"cfg",configsvr:true,members:[{_id:0,host:"127.0.0.1:27019"},{_id:1,host:"127.0.0.2:27019"},{_id:2,host:"127.0.0.3:27019"}]}});
new Mongo("127.0.0.1:27018").getDB("admin").runCommand({replSetInitiate:{_id:"shard0",members:[{_id:0,host:"127.0.0.1:27018"},{_id:1,host:"127.0.0.2:27018"}]}});
new Mongo("127.0.0.1:27028").getDB("admin").runCommand({replSetInitiate:{_id:"shard1",members:[{_id:0,host:"127.0.0.1:27028"},{_id:1,host:"127.0.0.2:27028"}]}});'
# Add shards through the query router
$ stack import \
--no-restart \
--require 127.0.0.1:27017 \
--require 127.0.0.{1..2}:27018 \
--require 127.0.0.{1..2}:27028 \
alpine/mongosh:latest \
mongo.cluster/config -- \
mongosh --host 127.0.0.1:27017 --quiet --eval \
'db.adminCommand({addShard:"shard0/127.0.0.1:27018,127.0.0.2:27018"});
db.adminCommand({addShard:"shard1/127.0.0.1:27028,127.0.0.2:27028"});
sh.status();'
# Link query, config, shard, init, and config job address spaces
$ stack import mongo.cluster/query \
mongo.cluster/query/query \
mongo.cluster/config/
$ stack import mongo.cluster/query/config \
mongo.cluster/query/config/config \
mongo.cluster/{query/shard0,query/shard1,init}/
$ stack import mongo.cluster/query/shard0 \
mongo.cluster/{init,config,query/config}/ \
mongo.cluster/query/shard0/shard0
$ stack import mongo.cluster/query/shard1 \
mongo.cluster/{init,config,query/config}/ \
mongo.cluster/query/shard1/shard1
# Deploy and scale the MongoDB cluster
$ stack deploy mongo.cluster mongo.cluster.microstacks.local
$ stack scale mongo.cluster.microstacks.local/query/config=3
$ stack scale mongo.cluster.microstacks.local/query/shard0=2
$ stack scale mongo.cluster.microstacks.local/query/shard1=2
# Inspect the running MongoDB cluster Vector Map
$ stack ps -r mongo.cluster.microstacks.local
TYPE IMAGE NODE NODEIP STATUS UPTIME VECTOR
ROUTER caddy:2 microstacks 10.45.0.1 running 1m mongo.cluster.microstacks.local
COMPONENT haohanyang/compass-web microstacks 10.45.0.1 running 1m mongo.cluster.microstacks.local/1
SERVICE mongo:8.3.7 microstacks 10.45.0.1 running 1m mongo.cluster.microstacks.local/query/1
SERVICE mongo:8.3.7 microstacks 10.45.0.1 running 1m mongo.cluster.microstacks.local/query/config/1
SERVICE mongo:8.3.7 microstacks 10.45.0.1 running 1m mongo.cluster.microstacks.local/query/config/2
SERVICE mongo:8.3.7 microstacks 10.45.0.1 running 1m mongo.cluster.microstacks.local/query/config/3
SERVICE mongo:8.3.7 microstacks 10.45.0.1 running 1m mongo.cluster.microstacks.local/query/shard0/1
SERVICE mongo:8.3.7 microstacks 10.45.0.1 running 1m mongo.cluster.microstacks.local/query/shard0/2
SERVICE mongo:8.3.7 microstacks 10.45.0.1 running 1m mongo.cluster.microstacks.local/query/shard1/1
SERVICE mongo:8.3.7 microstacks 10.45.0.1 running 1m mongo.cluster.microstacks.local/query/shard1/2
SERVICE alpine/mongosh:latest microstacks 10.45.0.1 completed 1m mongo.cluster.microstacks.local/init/1
SERVICE alpine/mongosh:latest microstacks 10.45.0.1 completed 1m mongo.cluster.microstacks.local/config/1
Define the Block Stack directly in Go with the Microstacks hub and block packages. The program composes router/components/services into a dependency hierarchy, then saves it as version-controlled application code.
package main import ( "log" "github.com/microstacks/stack/block" "github.com/microstacks/stack/component" "github.com/microstacks/stack/hub" "github.com/microstacks/stack/service" ) func main() { // Connect to a local Block Stack repository. repository, err := hub.Connect(".") if err != nil { log.Fatal(err) } // Create the WordPress router. wordpress, err := repository.Init( "wordpress", block.Image{ Name: "caddy", Version: "2", }, ) if err != nil { log.Fatal(err) } // Mount WordPress as the root component. root, err := wordpress.Root( component.Block( block.Image{ Name: "wordpress", Version: "7.0.2", }, ), ) if err != nil { log.Fatal(err) } // Import MySQL as a service dependency. _, err = root.Stack( service.Block( block.Image{ Name: "mysql", Version: "9.7.1", }, block.Tag("mysql"), ), ) if err != nil { log.Fatal(err) } // Atomically persist the WordPress Block Stack. if err := repository.Commit("wordpress"); err != nil { log.Fatal(err) } }
Self hosted
Run the block stack and vector map in your chosen cloud with the hosted Microstacks UI and managed DNS connectivity.
Join waitlistDeploy
$99/mo
Join waitlistSingle-node vector map
A managed single-node block stack connected to one vector map node in the cloud environment you choose.
Included features
Snap
$299/mo
Join waitlistSingle-cloud vector scaling
A three-node HA quorum block stack supporting a multi-node vector map inside one cloud environment.
Everything in Deploy, plus
Scale
$499/mo
Join waitlistFederated multi-cloud vector map
A five-node fault-tolerant quorum block stack supporting vector maps distributed across multiple clouds.
Everything in Snap, plus