Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions deploy/mvp-multinode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@ Single-host driver: `deploy/mvp-singlenode/scripts/run_mvp_demo.sh` (runs all co
node0 ──────►│ producers + agent-a (data source) │
10.10.1.1 │ │
│ │
node1 ◄──────│ gateway (ASAP arm only) │
10.10.1.2 │ │
node1 ── │ unused / reserved (former gateway slot; │
10.10.1.2 │ agent → asapquery- │
│ backend is the default │
│ path. `gateway_up()` │
│ in run_demo.sh stays │
│ defined-but-uncalled.) │
│ │
node2 ◄──────│ backend stack (asap-query-backend, │
10.10.1.3 │ minio, thanos-*, │
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ connectors:

exporters:
otlp/backend:
endpoint: gateway:4317
endpoint: backend:4317
tls:
insecure: true
# Backend's tonic gRPC server doesn't accept gzip-compressed bodies
Expand Down
8 changes: 5 additions & 3 deletions deploy/mvp-multinode/configs/asap/mvp-workload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,14 @@

# 2. LABEL AGGREGATION ACROSS SERIES AT ONE TIMESTAMP
# Outer: sum-by(zone) at instant. Inner: identity.
# Stage: gateway (cross-host fan-in merge); backend stores
# the merged sum-by-zone vector.
# Stage: edge sketches per-host; asapquery-backend's precompute
# engine performs the cross-host sum-by(zone) fan-in merge via its
# per-aggregation_id accumulators. (No middle-tier gateway OTel
# collector role is deployed; the merge happens server-side.)
- metric_name: http_requests_total
query_string: "sum by (zone) (http_requests_total)"
accuracy_sla: 0.0
assign_to_role: gateway
assign_to_role: agent

# 3. COMBINED WINDOW + LABEL AGGREGATION
# Inner: rate per series over 5m. Outer: sum-by(zone).
Expand Down
20 changes: 13 additions & 7 deletions deploy/mvp-multinode/scripts/run_demo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,21 @@
# freshness) but distributed across 4 hosts on 10.10.1.0/24:
#
# node0 (10.10.1.1) producers + agent-a (data source)
# node1 (10.10.1.2) gateway (ASAP arm only)
# node1 (10.10.1.2) unused / reserved (former gateway slot — see
# gateway_up() below, now
# defined-but-uncalled)
# node2 (10.10.1.3) backend stack (controller, asap-query-backend,
# prometheus, minio,
# thanos-{query,store-gateway,compact})
# node3 (10.10.1.4) producers + agent-b (data source)
#
# Three arms run back-to-back over the same workload:
# b0 OTel agent → Prometheus (PRW) [no gateway, no backend]
# b1 OTel agent + serfprocessor → Prometheus [no gateway, no backend]
# asap OTel agent → gateway → asap-query-backend [+ controller,
# + Thanos/MinIO archive, sketches per controller plan]
# b0 OTel agent → Prometheus (PRW) [no backend]
# b1 OTel agent + serfprocessor → Prometheus [no backend]
# asap OTel agent → asap-query-backend [+ controller,
# + Thanos/MinIO archive, sketches per controller plan;
# asap-query-backend's --enable-otel-ingest merges sketches
# per-aggregation_id via precompute-engine accumulators]
#
# Scope notes vs. the canonical single-host `run_mvp_demo.sh`:
# - Uses `docker run --network host --add-host` (no docker-compose, no
Expand Down Expand Up @@ -332,11 +336,14 @@ agents_down() {
}

# ─── ARM lifecycle ──────────────────────────────────────────────────
# gateway_up / gateway_down are no longer called by arm lifecycle —
# the default data path is agent → asapquery-backend directly. The
# functions stay defined so a topology that re-introduces a middle
# tier can re-enable them by re-adding the calls.
arm_up() {
local arm=$1
log "=== ARM UP: ${arm} ==="
backend_up "${arm}"
gateway_up "${arm}"
sleep 5
agents_up "${arm}"
log "=== arm ${arm} all containers started; waiting WARMUP_S=${WARMUP_S} ==="
Expand All @@ -346,7 +353,6 @@ arm_up() {
arm_down() {
log "=== ARM DOWN ==="
agents_down
gateway_down
backend_down
}

Expand Down
2 changes: 1 addition & 1 deletion deploy/mvp-multinode/scripts/run_demo_sweep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ print(f"\\nRun: \`${RUN_ID}\` | Soak: \`${SOAK}s\` | Workload: PER_AGENT_CAR
print("## §1 Per-arm NIC bandwidth (cluster-wide, /sys/class/net/enp130s0f0)\\n")
print("| arm | node | role | rx_MB/s | tx_MB/s | rx_total_MB | tx_total_MB |")
print("|---|---|---|---|---|---|---|")
roles = {"node0":"producer+agent-a","node1":"gateway","node2":"backend","node3":"producer+agent-b"}
roles = {"node0":"producer+agent-a","node1":"unused","node2":"backend","node3":"producer+agent-b"}
for f in sorted(glob.glob(os.path.join(RUN_DIR,"nic-*.csv"))):
arm = os.path.basename(f).replace("nic-","").replace(".csv","")
with open(f) as fh:
Expand Down
8 changes: 7 additions & 1 deletion deploy/mvp-multinode/topology.env
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@

# ── Node IPs ──
NODE0_IP=10.10.1.1 # producers + agent-a (data source)
NODE1_IP=10.10.1.2 # gateway (ASAP arm only)
NODE1_IP=10.10.1.2 # unused / reserved (former gateway-role host; the
# default data path is agent → asapquery-backend, so
# no container is brought up here. The `gateway:`
# DNS alias below still resolves to this IP for
# callers that opt back into the gateway tier — see
# gateway_up() in scripts/run_demo.sh, currently
# uncalled but preserved in source.)
NODE2_IP=10.10.1.3 # backend stack (asap-query-backend, MinIO, Thanos, Prometheus, controller)
NODE3_IP=10.10.1.4 # producers + agent-b (data source)

Expand Down
12 changes: 8 additions & 4 deletions deploy/mvp-singlenode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@ _Last updated: 2026-04-23 (post N=10 sweep)._
N ∈ {1, 10, 100} # number of edge agents
```

All other components (backend, gateway, controller, MinIO,
Prometheus, Grafana) stay at 1 replica — paper's claim is "one
controller coordinates N agents".
All other components (backend, controller, MinIO, Prometheus,
Grafana) stay at 1 replica — paper's claim is "one controller
coordinates N agents". The OTel **gateway** tier is opt-in via the
`gateway-legacy` profile (see `base.yml`); the default data path is
agent → asapquery-backend, with the precompute engine merging
sketches server-side via its per-aggregation_id accumulators.

## Compose (dev / small & mid scale)

Expand Down Expand Up @@ -54,7 +57,8 @@ agent containers. Host ports:
| 9090 | Prometheus | |
| 3000 | Grafana | (admin/admin, anon viewer also allowed) |
| 9000 / 9001 | MinIO S3 / console | raw-sample cold store (local disk via named volume) |
| 4317 / 4318 | gateway OTLP | where agents ship metrics |
| 4317 / 4318 | backend OTLP | where agents ship metrics (asapquery-backend's `--enable-otel-ingest`) |
| 14317 / 14318 | gateway OTLP | only when `--profile gateway-legacy` is set |

MinIO is configured as a local cold store (data in the
`minio-data` named volume under `/mydata/...`). Byte-layout
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ processors:
send_batch_size: 1024

exporters:
otlp/gateway:
endpoint: gateway:4317
otlp/backend:
endpoint: backend:4317
tls:
insecure: true

Expand All @@ -32,7 +32,7 @@ service:
metrics:
receivers: [otlp]
processors: [batch]
exporters: [otlp/gateway]
exporters: [otlp/backend]

telemetry:
logs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ processors:
send_batch_max_size: 1000000

exporters:
otlp/gateway:
endpoint: gateway:4317
otlp/backend:
endpoint: backend:4317
tls:
insecure: true

Expand All @@ -40,7 +40,7 @@ service:
metrics:
receivers: [otlp]
processors: [batch]
exporters: [otlp/gateway]
exporters: [otlp/backend]

telemetry:
logs:
Expand Down
16 changes: 9 additions & 7 deletions deploy/mvp-singlenode/configs/asap-otel-agent-b2-full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
# │ agent (this config) │
# │ receivers: otlp │
# │ processors: ddsketch + hll + batch │
# │ exporters: otlp/gateway, prometheus │
# │ exporters: otlp/backend, prometheus │
# └──────────────────────────────────────────┘
# │ │
# │ OTLP :4317 │ /metrics :8889
# ▼ ▼
# gateway → backend Prometheus scrape
# asapquery-backend Prometheus scrape
#
# Only DDSketch + HLL are enabled here: together they exercise
# the "quantile + distinct-count" joint path the paper's B2
Expand Down Expand Up @@ -70,10 +70,12 @@ processors:
send_batch_size: 1024

exporters:
# Forward sketched output to the gateway. Gateway config takes
# it from here — currently prometheusremotewrite → backend.
otlp/gateway:
endpoint: gateway:4317
# Forward sketched output directly to asapquery-backend's OTLP ingest
# (the precompute engine merges per-aggregation_id sketches
# server-side via its accumulators — no middle-tier gateway
# processor is in the path).
otlp/backend:
endpoint: backend:4317
tls:
insecure: true

Expand All @@ -88,7 +90,7 @@ service:
metrics:
receivers: [otlp]
processors: [ddsketch, HLL, batch]
exporters: [otlp/gateway, prometheus]
exporters: [otlp/backend, prometheus]

telemetry:
logs:
Expand Down
6 changes: 3 additions & 3 deletions deploy/mvp-singlenode/configs/asap-otel-agent-b3-delta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ processors:
send_batch_size: 1024

exporters:
otlp/gateway:
endpoint: gateway:4317
otlp/backend:
endpoint: backend:4317
tls:
insecure: true

Expand All @@ -51,7 +51,7 @@ service:
metrics:
receivers: [otlp]
processors: [ddsketch, HLL, batch]
exporters: [otlp/gateway]
exporters: [otlp/backend]

telemetry:
logs:
Expand Down
6 changes: 3 additions & 3 deletions deploy/mvp-singlenode/configs/asap-otel-agent-b4-tunable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ processors:
send_batch_size: 1024

exporters:
otlp/gateway:
endpoint: gateway:4317
otlp/backend:
endpoint: backend:4317
tls:
insecure: true

Expand All @@ -55,7 +55,7 @@ service:
metrics:
receivers: [otlp]
processors: [ddsketch, HLL, batch]
exporters: [otlp/gateway]
exporters: [otlp/backend]

telemetry:
logs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ connectors:

exporters:
otlp/backend:
endpoint: gateway:4317
endpoint: backend:4317
tls:
insecure: true
# Backend's tonic gRPC server doesn't accept gzip-compressed bodies
Expand Down
8 changes: 5 additions & 3 deletions deploy/mvp-singlenode/configs/mvp-workload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,14 @@

# 2. LABEL AGGREGATION ACROSS SERIES AT ONE TIMESTAMP
# Outer: sum-by(zone) at instant. Inner: identity.
# Stage: gateway (cross-host fan-in merge); backend stores
# the merged sum-by-zone vector.
# Stage: edge sketches per-host; asapquery-backend's precompute
# engine performs the cross-host sum-by(zone) fan-in merge via its
# per-aggregation_id accumulators. (No middle-tier gateway OTel
# collector role is deployed; the merge happens server-side.)
- metric_name: http_requests_total
query_string: "sum by (zone) (http_requests_total)"
accuracy_sla: 0.0
assign_to_role: gateway
assign_to_role: agent

# 3. COMBINED WINDOW + LABEL AGGREGATION
# Inner: rate per series over 5m. Outer: sum-by(zone).
Expand Down
7 changes: 5 additions & 2 deletions deploy/mvp-singlenode/configs/workloads.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,17 @@
# min row sum; see PROGRESS "Single-pipeline multi-sketch" note).
# Not exercised under b3-delta in the current cell; included so the
# full-sweep matrix (E3) can pick this up by toggling AGENT_CONFIG.
# Role tagged `agent`: the asapquery-backend's precompute engine
# merges per-aggregation_id sketches arriving via OTLP, so a
# middle-tier backend OTel collector role is no longer deployed.
- metric_name: http_requests_total
query_string: "sum(http_requests_total)"
accuracy_sla: 0.01
assign_to_role: backend
assign_to_role: agent

# 4. topk — CountSketch family. As above: lives here for the sweep,
# not for the b3-delta cell.
- metric_name: http_requests_total
query_string: "topk(10, http_requests_total)"
accuracy_sla: 0.05
assign_to_role: backend
assign_to_role: agent
6 changes: 5 additions & 1 deletion deploy/mvp-singlenode/docker-compose/agents-N1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@
x-agent: &agent-base
image: asap/asap-otel:dev
depends_on:
- gateway
# Agents OTLP-export sketches directly to asapquery-backend
# (asapquery-backend's --enable-otel-ingest merges them
# per-aggregation_id server-side). The gateway tier is opt-in
# via base.yml's `gateway-legacy` profile.
- backend
- controller
# Agents are configured via the mounted sketch pipeline; overriding
# the entrypoint isn't needed — the patched asap-otel binary
Expand Down
3 changes: 2 additions & 1 deletion deploy/mvp-singlenode/docker-compose/agents-N10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
x-agent: &agent-base
image: asap/asap-otel:dev
depends_on:
- gateway
# See agents-N1.yml for the agent → asapquery-backend rationale.
- backend
- controller
command:
- "--config=/etc/otel/config.yaml"
Expand Down
3 changes: 2 additions & 1 deletion deploy/mvp-singlenode/docker-compose/agents-N100.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
x-agent: &agent-base
image: asap/asap-otel:dev
depends_on:
- gateway
# See agents-N1.yml for the agent → asapquery-backend rationale.
- backend
- controller
command:
- "--config=/etc/otel/config.yaml"
Expand Down
Loading