# Cost-Effective Streaming Genomics: How to Optimize Cloud Spend

The one-sentence difference is this: batch genomics waits for a complete sequencing run, then processes it as one large job, while streaming genomics consumes reads continuously and produces results while the data is still arriving. The rule of thumb for choosing between them on cost grounds is simple. If you need results before the run finishes, or your compute sits idle between runs, a streaming design usually pays for itself. If you run one large alignment per week and nothing in between, a batch job on a cluster that spins up and tears down on demand is almost always cheaper.

Cost-effective streaming genomics is not about finding one magic pricing tier. It is the combined effect of four decisions: how your pipeline is architected, how you buy compute, how you store and move data, and how aggressively you shut things down. This article walks through each decision, compares the main streaming genomics cost optimization options side by side, gives worked scenarios, and lists the mistakes that quietly double cloud bills in real bioinformatics groups.

## What Streaming Genomics Actually Means

First, define the terms, because "streaming" gets used loosely in cloud bioinformatics.

**Sequencing reads** are the raw output of a sequencing instrument, conventionally stored in [FASTQ format](/knowledge/bioinformatics/fastq-file-format-phred-scores-qc), a text file pairing each read's sequence with quality scores. **Profiling** or **alignment** is the computational step that maps those reads against reference genomes to answer a biological question, such as which organisms are present in a metagenomic sample.

In a **batch pipeline**, the sequencer finishes a run, the full FASTQ files are copied to cloud storage, a cluster is launched, the entire dataset is processed at once, and the cluster is shut down. Nothing is computed until everything is available.

In a **streaming pipeline**, reads are emitted incrementally, either because the instrument pushes them out as flow cells complete, because a splitter chops an incoming FASTQ into chunks, or because the analysis engine consumes a directory or queue as a continuous source. The analysis engine processes each increment as it arrives and updates results continuously.

The best-documented example in the primary literature is Flint, a metagenomic profiling pipeline built on the Apache Spark framework. Spark is a distributed computing engine whose core abstraction, the Resilient Distributed Dataset, lets the same code run on one machine or on hundreds. Flint takes advantage of Spark's built-in parallelism and its streaming engine architecture to map reads against a very large reference collection quickly, running on Amazon's Elastic MapReduce (EMR) service [1]. The authors describe the design goal explicitly: a scalable, efficient, and affordable approach that brings big data solutions within the reach of laboratories with modest resources [1].

That phrase, "within the reach of laboratories with modest resources," is the thesis of streaming genomics cost optimization. The architecture itself is a cost tool. A streaming design lets you profile a sample with a smaller footprint of machines working continuously, rather than a large cluster sitting idle waiting for files to finish transferring.

There is a second, related meaning of streaming worth separating. **Structured Streaming** is Spark's built-in module for treating a continuously updated data source, such as an object storage prefix or a message queue, as an unbounded table that a query processes incrementally. A minimal illustration of the pattern looks like this:

```python
from pyspark.sql import SparkSession

spark = SparkSession.builder.appName("genomics-stream").getOrCreate()

reads = (spark.readStream
         .schema("value STRING")
         .text("s3://my-bucket/incoming-reads/"))

counts = reads.groupBy("value").count()

query = (counts.writeStream
         .outputMode("complete")
         .option("checkpointLocation", "s3://my-bucket/checkpoints/")
         .trigger(processingTime="30 seconds")
         .start())
```

In practice a genomics pipeline would replace the toy aggregation with alignment or k-mer counting logic, but the shape is the same: a continuous source, incremental processing, a checkpoint location that lets the job resume after interruption, and a configurable trigger interval that controls how often micro-batches run. That trigger interval is itself a cost lever. Processing every 30 seconds costs more than processing every 5 minutes, because each micro-batch keeps executors warm and allocated.

## Where the Money Goes in Cloud Bioinformatics

Before comparing options, you need an honest map of the cost drivers. Cloud bioinformatics bills are dominated by four line items, and streaming designs change all four.

**Compute.** Virtual machines, billed per second or per hour while running, do the alignment, profiling, and variant calling. In most genomics workloads this is the largest line item. The cost question is never "what does an instance cost" but "how many instance-seconds does my workload consume, and what fraction of those seconds do useful work."

**Storage.** Reference genomes, raw reads, intermediate alignment files such as BAM and CRAM, and result tables all live in object storage. Object storage bills by gigabyte-month, with cheaper tiers for data you access rarely. A 170 GB reference collection like the one Flint profiles against, drawn from 43,552 bacterial genomes in the Ensembl database, is small by modern standards but still must be stored somewhere every cluster can reach it fast [1].

**Data transfer.** Moving data between availability zones, between regions, or out to the internet carries per-gigabyte charges. Pipelines that shuffle large intermediates between nodes, or that copy raw reads between storage tiers repeatedly, accrue transfer costs that scale with data volume, not with compute time.

**Idle time.** This is the hidden driver and the one streaming architecture most directly attacks. A cluster provisioned for a weekly 6-hour batch job that runs for 6 hours and terminates costs one-fortieth of the same cluster left running all week. In practice, many groups pay for compute that does nothing: clusters left up over weekends, oversized node pools provisioned for peak load, or development clusters forgotten after a project ends.

Streaming changes the profile of these costs rather than simply reducing them. A streaming job keeps a smaller amount of compute busier for longer. That is cheaper than a large idle cluster, but more expensive than a batch cluster that exists for exactly the duration of one job. Understanding this trade is the foundation of every streaming genomics cost optimization decision that follows.

## The Core Comparison: Streaming Genomics Cost Optimization Options

The table below is the center of this article. Each row is a distinct option, and the columns capture how it bills, where it fits, and its pros and cons. The sections after the table explain each option on its own terms.

| Option | How it bills | Best fit | Pros | Cons | Main cost trap |
|--|--|--|--|--|--|
| On-Demand EC2, self-managed Spark | Per second or hour at published rates | Learning, prototyping, unpredictable one-off analyses | Full control, no commitment, simplest to start | Highest per-hour price, you manage scaling and failure | Forgetting to terminate clusters |
| Spot Instances | Market rate, often a large discount, interruptible | Fault-tolerant streaming jobs with checkpointing, batch alignment | Deep discounts on identical hardware | Two-minute interruption warning, capacity varies by pool | Running interruptible-fragile work on Spot without checkpointing |
| Savings Plans / Reserved capacity | Committed hourly rate over 1 or 3 years | Steady, predictable baseline load such as a permanent streaming cluster | Large discount on the committed share | Must be used or the commitment is wasted | Committing to a baseline that shrinks after a project ends |
| Amazon EMR with managed scaling and auto-termination | Instance-seconds plus a service fee per instance-hour | Production Spark genomics pipelines on AWS | Managed Spark, integrates with storage and monitoring, scales node groups automatically | Service fee on top of EC2, some configuration surface | Leaving clusters alive between runs instead of using auto-termination |
| EMR Serverless | Per vCPU-hour, per GB-memory-hour, per GB-storage-hour actually consumed by jobs | Bursty or intermittent workloads, teams without cluster operations staff | Zero idle cost, scales to zero between jobs, per-job billing | Less control over node topology, per-unit rates above raw EC2 | Submitting many tiny jobs whose per-job overhead dominates |
| Streaming-native architecture on a right-sized shared cluster | The cluster's instance-seconds, amortized across continuous work | Continuous ingestion with frequent partial results | High utilization of every billed second, results with low latency | Requires re-engineering batch code into incremental stages | Over-sizing the cluster for a peak that occurs rarely |
| Storage tiering and lifecycle policies | Per gigabyte-month, tiered by access frequency | Reference collections, archived raw reads, finished intermediates | Cuts the storage line item substantially with policy automation | Retrieval costs and latency on cold tiers | Life-of-cycle churn, where frequent rehydration costs more than the savings |
| Processor architecture choice (Arm-based vs x86 instances) | Per instance-hour, Arm options typically priced lower for comparable performance | Price-performance-sensitive Spark workloads that compile for Arm | Lower hourly rate for similar throughput on many workloads | Requires software builds compatible with the architecture | Testing only on one architecture and assuming savings transfer |

## The Options Explained

### On-Demand EC2 Instances

On-demand is the default billing mode: you pay the published rate for every second an instance runs, with no commitment and no interruption risk. For a self-managed Spark cluster, you launch instances, configure Spark, run your pipeline, and terminate everything yourself.

The pros are control and predictability. You choose the instance types, the network placement, the Spark version, and the exact lifecycle. For a team building its first streaming genomics pipeline, on-demand is the right place to start, because the engineering problem of making a pipeline incremental and fault-tolerant is hard enough without layering on discounted-but-interruptible capacity.

The cons are price and the discipline burden. On-demand carries the highest hourly rate of any compute option, and the entire burden of termination falls on you. The single most common line-item surprise in cloud bioinformatics is a development cluster left running through a weekend.

A minimal AWS CLI launch of a Spark cluster for a streaming test looks like this:

```bash
aws emr create-cluster \
  --name genomics-streaming \
  --release-label emr-7.1.0 \
  --applications Name=Spark \
  --instance-type m5.2xlarge \
  --instance-count 5 \
  --use-default-roles \
  --auto-termination-policy IdleTimeout=3600
```

The `-auto-termination-policy` flag with an idle timeout is the cheapest insurance in cloud bioinformatics. It terminates the cluster if no steps have run for the specified number of seconds.

### Spot Instances

![Flowchart from enabling checkpointing through diversifying instance types to testing a deliberate reclamation before production.](/article-images/illustrations/streaming-genomics-cost-optimization-spot-safety-path.webp)

Spot capacity is spare cloud capacity sold at a steep discount, with the caveat that the provider can reclaim it, typically with a short warning period. For genomics workloads, Spot is the highest-leverage cost optimization available, and also the one that breaks pipelines when misapplied.

The pro is straightforward: the same alignment work costs substantially less per instance-hour. The con is interruption. A Spot reclamation kills the instance mid-task. Whether that costs you money or saves it depends entirely on whether your pipeline resumes cleanly.

This is where streaming architecture earns its keep. A Spark Structured Streaming job with a checkpoint location records its progress continuously and restarts from the last committed micro-batch after a failure. A well-checkpointed streaming job is nearly ideal Spot workload: interruptions cost minutes, not hours. A batch job with no intermediate state that loses a 4-hour alignment step to a reclamation has paid for 4 hours and received nothing.

Practical Spot discipline for aws genomics workloads:

1. Use instance fleets or diversified instance types so the job can fall back across pools when one pool tightens.
2. Enable checkpointing on every streaming stage and write checkpoints to durable object storage, not local disks.
3. Use Spot for core and task nodes and keep any single master node on on-demand capacity, since losing the master loses the whole cluster.
4. Test reclamation behavior deliberately. Terminate a task node mid-run in a staging environment and verify the job resumes correctly.

### Savings Plans and Reserved Capacity

Commitment-based pricing trades a one- or three-year commitment for a lower hourly rate. The pro is a meaningful discount on your steady baseline. The con is rigidity: if the committed capacity goes unused, you have paid for nothing.

The right way to apply commitments in streaming genomics cost optimization is to size them to the floor, not the peak. A streaming pipeline's defining property is continuous, predictable load, which makes it a good commitment candidate. But the correct commitment covers the minimum cluster you will run every hour of every day, not the cluster you wish you had at peak. Peak overflow belongs on Spot. Committing to peak is the classic error, and it typically surfaces when a grant ends or a project consolidates and the baseline drops below the commitment.

### Managed Clusters on Amazon EMR

Amazon EMR is a managed service that provisions and configures Spark, Hadoop, and related frameworks on EC2. Flint itself runs on EMR, which is why the service is well documented as a substrate for streaming genomics: the authors report fast real-time profiling of metagenomic samples against a large reference collection using Spark's parallelism and streaming engine on EMR [1].

The pros of a managed cluster are operational. EMR handles Spark installation, version compatibility, integration with object storage, and node lifecycle, which converts engineer-hours into a service fee. Managed scaling adjusts core and task node counts automatically based on workload metrics, and auto-termination closes the cluster after idle time.

The cons are the service fee layered on top of EC2 pricing and the residual temptation to keep a cluster warm. A persistent cluster running 24/7 "because restarts take time" is usually a false economy unless your streaming job genuinely runs continuously. If your ingestion arrives in bursts, a pattern of terminate on idle and relaunch on data arrival, driven by an event rule, usually costs less than keeping warm nodes.

### EMR Serverless

Serverless options invert the billing model. Instead of paying for machines, you pay for the vCPU-hours, memory-GB-hours, and storage-GB-hours your jobs actually consume. When no job runs, you pay nothing.

The pros fit a specific profile well: bursty workloads, small teams without dedicated cluster operations, and analyses that run intermittently. For a lab with modest resources, this model has real appeal, echoing the affordability goal that motivated Flint's design [1]. There is no idle cost at all, which eliminates the most common failure mode of managed clusters.

The cons are per-unit economics and granularity. Per-unit serverless rates sit above raw EC2 rates, so a workload with high, steady utilization will usually cost less on committed Spot-heavy clusters. Also, each job carries startup overhead. Many small streaming-style jobs submitted in rapid succession can spend more on repeated initialization than one right-sized long-lived streaming job would spend keeping executors warm.

The honest decision rule: serverless wins when utilization is low and unpredictable. A dedicated cluster with Spot nodes wins when utilization is high and steady. This is the single cleanest statement of streaming genomics cost optimization trade-offs, and it applies across cloud providers, not just AWS.

### Streaming-Native Pipeline Design

This option is architectural rather than procurement-related, and it is the one most often overlooked. Two pipelines producing identical results can differ in cost by a large factor purely based on how they were designed to consume data.

A batch design pays for peak: it provisions for the largest stage of the largest job and idles through the rest. A streaming design pays for throughput: it provisions for a steady input rate and lets results accumulate incrementally. When input arrives steadily, streaming keeps every billed instance-second busy. When input arrives in lumps, a streaming design degenerates toward batch, and a batch design with aggressive teardown wins.

The Flint paper is a useful demonstration of what streaming design buys. The pipeline maps reads against a reference collection of 43,552 bacterial genomes totaling 170 GB, drawn from Ensembl, and the authors note that large reference collections give a more complete and accurate profile of the bacterial population than the small representative collections most tools were designed around [1]. The streaming architecture is what makes a reference collection of that size tractable in real time, because reads flow into the analysis continuously rather than waiting for a monolithic job [1].

Concretely, moving a genomics workflow toward streaming design means:

1. Splitting incoming FASTQ data into chunks as it lands, so no stage waits for the whole file.
2. Writing each processing stage to emit partial results, using checkpointing so partial results are durable.
3. Sizing the cluster to the average ingestion rate, not the total run size, and relying on incremental processing to catch up.
4. Choosing a trigger interval deliberately. Longer intervals between micro-batches lower cost and raise latency, and the right choice is a measured decision, not a default.

### Storage Lifecycle Design

Storage is the quiet line item. Reference collections, raw reads, and intermediates all bill monthly, and genomic datasets are large enough that storage charges compound.

The pros of lifecycle policies are automation and scale. Object storage classes trade retrieval speed and retrieval cost for cheaper storage per gigabyte-month, so moving raw reads to colder tiers once analysis completes, and archiving finished project data on a schedule, cuts the storage bill without manual work. Keeping a shared reference collection such as Flint's 170 GB bacterial set in a fast, durable tier that every cluster mounts read-only is standard practice and avoids every cluster storing its own copy [1].

The cons and traps deserve equal attention. Retrieval from cold tiers carries per-gigabyte charges and delay. A lifecycle policy that bounces data between tiers, because some job periodically reads archived data, can cost more in retrieval than it saves in storage. The fix is to classify data by access pattern deliberately: hot for anything an active pipeline reads, cold for raw data already processed, and archive for data kept only for reproducibility.

### Processor Architecture

Arm-based instance families typically price lower per hour than comparable x86 families and can deliver similar throughput on many workloads. The pro is a direct discount on the same work. The cons are compatibility and testing: libraries, compiled tools, and container images must all work on the target architecture, and performance characteristics must be verified for your specific pipeline rather than assumed.

For Spark-based streaming genomics on EMR, Arm-based instances are a reasonable candidate for the task and core node groups where your Spark code and dependencies are architecture-portable. The rule is the same as for Spot: verify with your own benchmark before migrating production load.

## A Worked Reference Point: What a Real Streaming Genomics Benchmark Shows

The most useful published data point for streaming genomics performance on AWS comes from the Flint study, and it is worth walking through what the numbers actually demonstrate [1].

The workload: profiling 1 million Illumina paired-end reads against 43,552 bacterial reference genomes totaling 170 GB. The platform: Amazon EMR. The result: Flint profiled the sample on 64 machines in 67 seconds, which the authors describe as an order of magnitude faster than the state of the art, while using a much larger reference collection [1].

Read those numbers as a cost optimization lesson, not just a speed claim. A 64-machine cluster running for roughly one minute consumes far fewer instance-seconds than a smaller cluster running for an hour. The benchmark shows that a streaming, Spark-based design converts a hard scaling problem, profiling against a reference collection far larger than conventional tools handle, into a parallelism problem that finishes quickly enough to make short-lived, fully-utilized clusters viable [1]. Short runtime plus high utilization is the formula that makes both Spot capacity and serverless billing attractive, because both reward workloads that pack dense useful computation into brief windows.

The second lesson is about reference collections. The authors point out that most profiling tools were built for small representative genome sets and scale poorly to large ones, while larger collections yield more complete and accurate profiles [1]. Storage architecture, keeping one shared, fast reference collection that all clusters read, is therefore not an implementation detail. It is what allows the affordable, scalable approach the paper set out to deliver [1].

## Worked Scenarios

Abstract options become decisions in concrete situations. Here are three patterns that cover most streaming genomics cost questions in practice. The dollar outcomes are described qualitatively, because actual prices change and depend on your negotiated rates, region, and instance mix. What the scenarios fix is the structure of the decision.

### Scenario 1: Rapid Profiling With Turnaround Requirements

A public health or clinical-adjacent lab needs metagenomic profiling results quickly as samples arrive, because results feed a same-day decision. Input is continuous during business hours, latency requirements are strict, and the reference collection is large.

The streaming-native design fits. A right-sized always-on cluster during the operating window, with executors kept warm because the next micro-batch is always seconds away, matches the cost profile to the mission. Spot capacity is a poor fit for the latency-critical path, because a reclamation at the wrong moment breaches the turnaround commitment, though Spot can still serve development and backfill work. Commitments sized to the daytime baseline, with the cluster terminating overnight and weekends via auto-termination, capture most of the available savings. Serverless is a weaker fit here because per-job initialization overhead works against the latency requirement on every sample.

The Flint result is directly relevant to this scenario's shape: a streaming pipeline on EMR profiling a million paired-end reads against a very large reference collection in about a minute on 64 machines shows that the compute window per sample can be short enough that cluster-level cost per sample stays modest even at aggressive latency targets [1].

### Scenario 2: Weekly Surveillance Batch With Streaming Ingestion

A research group runs metagenomic surveillance. Samples accumulate continuously through the week, but results are only needed on a weekly cadence. Nobody is waiting for interim answers.

Here the honest answer is that streaming architecture is optional and full streaming would cost more. The cost-effective pattern is continuous ingestion into durable storage, then a scheduled batch job that spins up on Spot-diversified EMR nodes, processes the week's accumulation, and terminates. Auto-termination covers the forgotten-cluster risk. Commitments are inappropriate because utilization is spiky. The streaming elements that do pay off are incremental: chunking ingestion and checkpointing intermediate state so a Spot interruption during the weekly run costs minutes rather than a full re-run.

### Scenario 3: A Small Lab With Modest Resources and Bursty Demand

A university lab with limited budget runs occasional metagenomic profiling against a large reference collection, with demand that comes in project-driven bursts and long idle gaps.

This is the profile the Flint authors explicitly targeted: big data solutions within the reach of laboratories with modest resources [1]. Serverless billing fits best. Pay per job, pay nothing between projects, accept the per-unit premium in exchange for eliminating idle cost and cluster operations. Pair it with shared storage for the reference collection so each burst does not rebuild or re-copy reference data, and with lifecycle policies that archive completed project outputs automatically. If the lab's demand later becomes steady, the balance shifts toward a Spot-heavy persistent cluster, and the decision should be revisited with real utilization data rather than habit.

## How to Compare Options Fairly

![Decision path asking whether demand is steady or bursty and whether latency is needed, ending in a recommended billing mode.](/article-images/illustrations/streaming-genomics-cost-optimization-billing-mode-choice.webp)

Three criteria decide real choices, and they are worth applying explicitly to any streaming genomics cost optimization option you evaluate.

**Utilization, not rate.** A discounted hourly rate on a half-idle cluster loses to a full-rate cluster running flat out. Always compare cost per unit of useful work, such as cost per sample profiled or per million reads processed, never cost per hour in isolation.

**Cost of failure.** Every interruption-tolerant discount, especially Spot, is priced against your pipeline's ability to resume. A pipeline with checkpointing makes Spot nearly free savings. A pipeline without it makes Spot a lottery.

**Latency requirement.** Streaming buys latency. If no one is waiting for results before a run completes, you are paying a premium, in architecture complexity and sometimes in idle warm capacity, for a benefit no one uses. Match the architecture to the actual turnaround need, not to the most impressive one.

## Common Mistakes and Limitations

These are the errors that show up repeatedly in real cloud bioinformatics spending, with practical fixes.

1. **Leaving clusters running between runs.** The most common and most preventable waste. Enable auto-termination everywhere, and set an idle timeout shorter than feels comfortable. Audit for orphaned clusters on a schedule.
2. **Running interruptible-fragile work on Spot.** Spot savings only materialize if the pipeline resumes cleanly. Without checkpointing to durable storage, a reclamation mid-alignment discards all compute since the last durable write. Fix the pipeline first, then take the discount.
3. **Committing to peak instead of floor.** Savings Plans and reservations should cover the load you will run every hour without exception. Committing to peak capacity converts a temporary project surge into a multi-year liability.
4. **Assuming streaming is automatically cheaper.** Streaming architecture buys latency and utilization. When input arrives in lumps and nobody needs interim results, batch with aggressive teardown is cheaper. Choose per workload.
5. **Sizing for a rare peak.** Provisioning a cluster for the largest conceivable run, then running average workloads on it, pays peak prices all year. Managed scaling, serverless billing for overflow, or simply accepting longer runtime on rare peaks all beat permanent over-provisioning.
6. **Churning data through storage tiers.** Lifecycle policies that repeatedly rehydrate cold data cost more in retrieval charges than they save in storage. Classify data by access pattern once, deliberately, and let policies act on stable categories.
7. **Ignoring data transfer topology.** Moving large intermediates across zones or regions repeatedly, or copying reference collections per cluster, accrues charges that scale with data volume. Keep shared references in one fast, durable, read-only location and process data in the zone where it lives.
8. **Skipping your own benchmark.** Published benchmarks, including Flint's, demonstrate an architecture on a specific workload, hardware, and reference collection [1]. Instance pricing, tool versions, and data characteristics differ across labs. The only number that predicts your bill is a benchmark of your pipeline on your data under the billing mode you plan to buy, and running that benchmark before committing capacity is the cheapest hour of cloud spend you will ever buy.

Two limitations belong on the record. Published performance numbers are workload-specific, and the Flint figures describe metagenomic profiling against a bacterial reference collection, a different compute profile from whole-genome alignment of large eukaryotic genomes [1]. And cloud pricing structures change, so any procurement decision should be re-validated against current published rates at the time you commit.

## Frequently Asked Questions

### Is streaming genomics always cheaper than batch processing?

No. Streaming saves money when input arrives steadily and results are needed with low latency, because it keeps every billed instance-second busy. When input arrives in lumps and no one needs interim results, batch processing with aggressive cluster teardown costs less.

### Can Spot Instances be used for production genomics pipelines?

Yes, provided the pipeline checkpoints its state to durable storage so it resumes cleanly after interruption. Keep master nodes on on-demand capacity, diversify instance types, and test reclamation behavior before production use.

### Does EMR Serverless cost less than a persistent EMR cluster?

It depends on utilization. Serverless costs less for bursty, intermittent workloads because idle time is free, while a persistent Spot-heavy cluster costs less for steady, high-utilization streaming work because its per-unit rates are lower.

### How much does it cost to stream a sequencing run?

There is no single figure. Cost scales with the number of instance-seconds your pipeline consumes, the size and tier of stored data, and transfer charges, all of which vary by pipeline, reference collection size, and billing mode. Benchmark your own workload and compare cost per sample profiled rather than per hour.

### Do I need Apache Spark to do streaming genomics?

No, but Spark is the most documented option for it. Spark's built-in parallelism and streaming engine are what enabled the Flint pipeline to profile reads against a very large reference collection quickly on Amazon EMR, and similar patterns exist in other frameworks.

### What is the single biggest cost lever in AWS genomics workloads?

Eliminating idle compute. Auto-termination, scaling to zero, and sizing clusters to actual load attack the largest and most avoidable cost in most cloud bioinformatics bills.

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "Is streaming genomics always cheaper than batch processing?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "No. Streaming saves money when input arrives steadily and results are needed with low latency, because it keeps every billed instance-second busy. When input arrives in lumps and no one needs interim results, batch processing with aggressive cluster teardown costs less."
      }
    },
    {
      "@type": "Question",
      "name": "Can Spot Instances be used for production genomics pipelines?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Yes, provided the pipeline checkpoints its state to durable storage so it resumes cleanly after interruption. Keep master nodes on on-demand capacity, diversify instance types, and test reclamation behavior before production use."
      }
    },
    {
      "@type": "Question",
      "name": "Does EMR Serverless cost less than a persistent EMR cluster?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "It depends on utilization. Serverless costs less for bursty, intermittent workloads because idle time is free, while a persistent Spot-heavy cluster costs less for steady, high-utilization streaming work because its per-unit rates are lower."
      }
    },
    {
      "@type": "Question",
      "name": "How much does it cost to stream a sequencing run?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "There is no single figure. Cost scales with the number of instance-seconds your pipeline consumes, the size and tier of stored data, and transfer charges, all of which vary by pipeline, reference collection size, and billing mode. Benchmark your own workload and compare cost per sample profiled rather than per hour."
      }
    },
    {
      "@type": "Question",
      "name": "Do I need Apache Spark to do streaming genomics?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "No, but Spark is the most documented option for it. Spark's built-in parallelism and streaming engine are what enabled the Flint pipeline to profile reads against a very large reference collection quickly on Amazon EMR, and similar patterns exist in other frameworks."
      }
    },
    {
      "@type": "Question",
      "name": "What is the single biggest cost lever in AWS genomics workloads?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Eliminating idle compute. Auto-termination, scaling to zero, and sizing clusters to actual load attack the largest and most avoidable cost in most cloud bioinformatics bills."
      }
    }
  ]
}
</script>

## Sources

1. [Large scale microbiome profiling in the cloud.](https://pubmed.ncbi.nlm.nih.gov/31510682/)