csbench
process that orchestrates, scores, and persists) from data plane (the load
generator + measurement client that actually drives the platform under test).
The data plane runs in the target region on a probe carrier. The control
plane never sits in the measurement path.
Control ↔ data plane over OSS (no inbound to the carrier)
The two planes talk only through object storage — the carrier has no public inbound surface and the control plane never opens a connection to it:probe/): oss_channel (the wire
protocol — job / result / progress / heartbeat / stop keys), agent_loop (the
carrier-side poller), oss_dispatch_client (OssProbeClient, the control-side
client — a drop-in for the legacy HTTP RemoteProbeClient). The measured numbers
come from carrier→platform calls, in-region; the OSS hops carry only control
messages and bulk telemetry.
Carrier = ECS (not a container)
The carrier needs an isolated, in-region compute that any open-source user can stand up in their own account without a private artifact. On Aliyun that rules out every container option and points to a plain ECS instance:
ACS/ACK are container services (ACS runs on ECI) — they inherit the image
requirement. A container image is either a private artifact (un-shippable for an
open-source tool) or requires a paid ACR Enterprise subscription to auto-mirror a
public base — friction either way. ECS boots a stock, Aliyun-hosted OS image
(Aliyun Linux / Ubuntu) — free, public, no registry, no custom image — so it
sidesteps the container-image problem entirely while keeping a dedicated,
isolated VM for clean load generation.
Cost: a small ECS is pay-as-you-go per second (~¥0.05–0.1/hr); it is created at
campaign start and destroyed at the end, like any other per-run resource.
The code is the published package (pip install)
clousight-bench is already a pip package, so the carrier installs the probe the
ordinary way — no image, no private artifact, no code upload of a second
copy:
- Reproducible: the control plane passes its own version, so the carrier runs the same probe code.
- Open source: it installs the public package everyone else installs.
- Change the code → just release (or, in dev, re-upload the wheel) — nothing to rebuild on the carrier.
China-region constraints (why every source is Aliyun-internal)
Verified live on cn-hangzhou: docker hub, github, and pypi.org are all throttled/blocked from the region. The design fetches nothing from those:
Only the AgentRun hop needs egress, so a NAT gateway is provisioned — gated
by a separate
enable_nat flag and torn down after the run, because it is the
only hourly-billing piece (see the terraform module). Everything else is
VPC-internal.
Reproducible + automatable, per-run
The carrier is not terraform-managed shared infra — it is an ephemeral, per-campaign resource created and destroyed by the runtime (SDK/API), the same way AgentRuntime instances and theagent.zip artifact are. Terraform owns only
the persistent base (VPC/subnet/SG, RAM identities, the enable_nat toggle).
Generalizing across clouds
The pattern is vendor-neutral where it matters and vendor-specific only in the launch layer:- Vendor-neutral: the OSS-mediated control channel, the probe logic, and
pip install clousight-bench[probe]. - Per-vendor: the carrier launch (Aliyun ECS user-data; AWS EC2/Fargate user-data; GCP GCE startup-script) and the object-store + mirror endpoints.
Live bring-up runbook (Aliyun ECS carrier)
A one-time-per-run live checklist. Two identities are in play: the main account AK runsterraform apply (it creates RAM/NAT); the benchmark RAM
user’s static AK runs the campaign. Use static AK for the campaign — a dev-wheel
presigned URL signed with a temporary/STS credential is capped by that token’s
expiry and can fail mid-boot.
0. Find a stock OS image id (no private image needed):
ecs:RunInstances/DescribeInstances/DeleteInstances ops policy. NAT/EIP are the
only hourly-billed resources — tear them down when done (step 8).
2. Export the run config and enable the dev-wheel fallback (until the running
version is published to the Aliyun PyPI mirror):
oss_bucket, region, eci_vswitch_id,
eci_security_group_id, eci_probe_role, ecs_image_id, ecs_instance_type.
3. Credentials (benchmark RAM user, static AK):
--probe ecs:
observations.vantage.carrier == "ecs" and
in_vpc == true, no CarrierError, and the probe’s OSS telemetry synced into the
results dir.
8. Reap + tear down:
Forbidden.RamRoleNotExist/ PassRole 403 on first launch → usually RAM propagation (2–5 min); the role must trustecs.aliyuncs.com.- Instance stuck / pip can’t fetch the wheel → the instance has no public IP; egress is via NAT only. Confirm the presigned URL uses the VPC-internal OSS host and the NAT reaches both the PyPI mirror and the AgentRun endpoint.
DescribeInstancesfield shapes (status,creation_time,instance_id) — confirm against the live response the carrier/reaper assume.