RepoMicrosoftMicrosoftpublished May 20, 2026seen 5d

microsoft/aura-simulator

Scala

Open original ↗

Captured source

source ↗
published May 20, 2026seen 5dcaptured 12hhttp 200method plain

microsoft/aura-simulator

Description: Multi-paradigm cloud simulator framework in Scala 3 (IaaS, FaaS, containers, edge, federated).

Language: Scala

License: MIT

Stars: 0

Forks: 0

Open issues: 2

Created: 2026-05-20T19:44:35Z

Pushed: 2026-06-08T06:19:14Z

Default branch: main

Fork: no

Archived: no

README:

Aura

> A high-performance, multi-paradigm cloud simulation framework.

![CI](https://github.com/microsoft/aura-simulator/actions/workflows/ci.yml)

Overview

Aura is an actor-based discrete event simulation (DES) framework for cloud computing research. Built in Scala 3 with Apache Pekko typed actors, it supports IaaS, serverless, container orchestration, edge computing, and batch scheduling workloads in a single unified simulation. All state is immutable, all policies are pure functions, and the type-safe DSL catches configuration errors at compile time.

Key Features

  • Parallel DES engine. Event dispatch via Apache Pekko typed actors with barrier synchronization.
  • Type-safe units. Opaque types for MIPS, PEs, MegaBytes, SimTime, MI, Watts, etc. prevent unit confusion at compile time.
  • Context-function DSL. Declarative simulation configuration using Scala 3 context functions.
  • Multi-paradigm. IaaS VMs, serverless functions, Kubernetes pods, edge tasks, GPU inference, federated workflows, and HPC batch jobs in a single simulation.
  • Immutable state. All actor state transitions produce new immutable values. No shared mutable state.
  • Pure-function policies. Allocation, scheduling, scaling, consolidation, and migration policies are plain functions.
  • GPU inference simulation. LLM inference with prefill/decode phases, KV cache, continuous batching, and energy-aware scheduling.
  • Real-world trace replay. Google Cluster and Azure VM trace parsers for realistic workload generation.
  • Interactive visualization. HTML reports with Chart.js dashboards.

Quick Start

Prerequisites

  • JDK 17+
  • sbt 1.10+

Build & Test

sbt compile # compile all modules
sbt test # run 1,100+ tests

Your First Simulation

sbt "auraExamples/runMain io.aura.examples.BasicIaaSExample"
import io.aura.core.types.*
import io.aura.dsl.SimulationDsl.*
import io.aura.iaas.policies.{VmAllocationPolicy, WorkloadScheduler}

val config = simulation("my-sim", endTime = SimTime(1000.0)) {
datacenter("dc-1") {
allocationPolicy(VmAllocationPolicy.bestFit)
scheduler(WorkloadScheduler.timeShared)
host(pes = PEs(4), mips = MIPS(10000.0), ram = MegaBytes(16384.0))
}
broker("broker-1") {
vm(pes = PEs(2), mips = MIPS(10000.0), ram = MegaBytes(4096.0))
workloads(count = 4, length = MI(10000.0), pes = PEs(1))
}
}

config.run() match
case Right(results) =>
println(results.formatWorkloadTable)
println(s"Avg completion: ${results.avgCompletionTime.value}s")
case Left(error) =>
println(s"Failed: $error")

Expected output:

Workload VM Host Status Start Finish Duration MI
0 0 0 SUCCESS 0.00 1.00 1.00 10000
1 0 0 SUCCESS 0.00 1.00 1.00 10000
2 0 0 SUCCESS 0.00 1.00 1.00 10000
3 0 0 SUCCESS 0.00 1.00 1.00 10000

Multi-Paradigm Simulations

IaaS

val config = simulation("iaas", endTime = SimTime(1000.0)) {
datacenter("dc-1") {
allocationPolicy(VmAllocationPolicy.bestFit)
scheduler(WorkloadScheduler.timeShared)
hosts(count = 10, pes = PEs(16), mips = MIPS(20000.0), ram = MegaBytes(65536.0),
powerModel = Some(PowerModel.linear(Watts(400.0), Watts(150.0))))
}
broker("broker-1") {
costRates(CostRates.awsM5)
vms(count = 50, pes = PEs(2), mips = MIPS(2000.0), ram = MegaBytes(4096.0))
workloads(count = 500, length = MI(20000.0), pes = PEs(1))
}
}

Serverless

import io.aura.serverless.*

val config = simulation("faas", endTime = SimTime(300.0)) {
faasPlatform("lambda") {
coldStartModel(ColdStartModel.byRuntime)
billingModel(BillingModel.awsLambda)
function("handler") {
runtime(Runtime.Python)
memory(MegaBytes(256.0))
timeout(SimTime(30.0))
}
}
serverlessBroker("client") {
invocations("handler", count = 100, executionLength = MI(1000.0),
arrivalPattern = ArrivalPattern.poisson(rate = 10.0))
}
}

Kubernetes

import io.aura.containers.*

val config = simulation("k8s", endTime = SimTime(500.0)) {
datacenter("dc-1") {
hosts(count = 4, pes = PEs(8), mips = MIPS(20000.0), ram = MegaBytes(32768.0))
}
k8sCluster("cluster") {
schedulingPolicy(K8sScheduler.leastRequested)
deployment("web") {
replicas(3)
container("nginx") {
cpuRequest(MIPS(500.0))
memoryRequest(MegaBytes(256.0))
}
workloadPerPod(length = MI(5000.0))
}
}
}

Edge Computing

import io.aura.edge.*

val config = simulation("edge", endTime = SimTime(500.0)) {
edgeEnvironment("metro") {
latencyModel(LatencyModel.combined())
offloadingPolicy(OffloadingPolicy.latencyAware)
edgeNode("sensor-hub") {
location(40.7128, -74.0060)
tier(EdgeTier.EdgeMicro)
resources(PEs(2), MIPS(2000.0), MegaBytes(2048.0))
}
taskSource("sensors") {
sourceNode("sensor-hub")
tasks(count = 20, cpuRequired = MIPS(100.0), taskLength = MI(500.0))
}
}
}

Federated Multi-Tier

val config = simulation("federated", endTime = SimTime(5000.0)) {
edgeEnvironment("edge-env") { /* edge nodes */ }
faasPlatform("functions") { /* serverless tier */ }
k8sCluster("k8s-prod") { /* container tier */ }
federatedWorkflow("pipeline") {
tierSelection(TierSelectionPolicy.edgeFirst)
escalation(EscalationPolicy.cascade)
edgeTier(environment = "edge-env", sourceNode = "edge-1")
serverlessTier(platform = "functions", functionName = "process")
k8sTier(cluster = "k8s-prod")
}
}

LLM Inference

import io.aura.inference.*
import io.aura.gpu.*

val config = simulation("inference", endTime = SimTime(100.0)) {
inferenceEngine("vllm-0") {
model(LlmModelSpec.llama2_7B)
gpu(GpuDeviceSpec.a100_80g)
gpuCount(1)
maxBatchSize(32)
kvCachePages(2048)
}
inferenceBroker("client") {
targetEngine(0)
requestBatch(count = 100, inputTokens = 512, outputTokens = 128,
arrivalPattern = ArrivalPattern.poisson(rate = 10.0))
sloTarget(SimTime(2.0))
}
}

Batch Scheduling

val config = simulation("hpc", endTime = SimTime(1000.0)) {
datacenter("dc-1") { host(pes = PEs(4), mips = MIPS(10000.0), ram = MegaBytes(16384.0)) }
broker("iaas") { vm(); workload() }
batchBroker("hpc") {
computeNodes(8, cpu = MIPS(2000.0), ram = MegaBytes(4096.0))…

Excerpt shown — open the source for the full document.

Notability

notability 3.0/10

New repo by Microsoft, no traction info