Skip to content

[meta] PROM-35 Remote Write (PRW2.0) Stability #16944

Open
5 of 14 issues completed
Open

Description

@bwplotka

Context

This is an umbrella issue collecting things we plan to implement for the stable Prometheus Remote Write 2.0 (PRW2.0) protocol and Prometheus implementation; also described by the PROM-35 proposal. Superseeds #1310 and #14360

Anyone is welcome to comment or DM me, @cstyan or @saswatamcode to add/update/remove things from this list!

Acceptance Criteria

This is issue will be closed when we will be able to mark PRW2.0 as stable and when we can start the official process of planned deprecation and switching the default PRW method to V2 instead of V1. That "stability", depends in general, on:

a) The acceptable state (functionality and performance) of the Prometheus receive and export (write) Remote Write 2 implementation.
b) Some adoption for (at least) receiving in the ecosystem, by systems like Cortex, Thanos, Mimir and/or vendors.

Tasks

List of tasks towards stability.

Protocol

  • Decide what to do with "Timestamp on exemplar is MUST" @cstyan
  • Decide on delta type improvement (specifically CT/ST per sample addition) @fionaliao @carrieedwards
  • NewRelic dev asked in the past what to do with the WriteResponse when the parsing is async. Extend the protocol to cover this case (e.g. "Written" header with "N/A" value or so) (breaking change)
  • Consider the best way to allow exemplar per sample and per series handling

Prometheus Implementation

Adoption / Documentation / Integrations

Out of scope for GA / nice-to-have

Activity

  1. self-assigned this
    on Jul 29, 2025
  2. GiedriusS commented on Jul 29, 2025

    @GiedriusS
    Contributor

    Thanks for the work on RW2.0. I have a very small topic/issue or maybe even my misunderstanding:

    Senders MAY use those headers to confirm which parts of data were successfully written by the Receiver. Common use cases:
    
        Better handling of the [Partial Write](https://prometheus.io/docs/specs/prw/remote_write_spec_2_0/#partial-write) failure situations: Senders MAY use those headers for more accurate client instrumentation and error handling.
    

    How could those headers help with partial write handling if it is unclear from them which samples were written? If I am sending series A, B, C, and B & C were written successfully, I'd like the headers to tell me that so that I could only retry sending A. At this point in time, the headers will only tell me that 2 series were written successfully out of 3. Could you explain that a little bit?

  3. bwplotka commented on Jul 29, 2025

    @bwplotka
    MemberAuthor

    How could those headers help with partial write handling if it is unclear from them which samples were written? If I am sending series A, B, C, and B & C were written successfully, I'd like the headers to tell me that so that I could only retry sending A. At this point in time, the headers will only tell me that 2 series were written successfully out of 3. Could you explain that a little bit?

    Yes and great question @GiedriusS!

    They help without that low level information. We started explaining why in our proposal.-,%23%23%23%20Partial%20Writes,-PRW%202.0%20generally), but it could be expanded, I will make note to extend this point.

    TL;DR: It's already a huge improvement to know and decide what you want to do with the knowledge IF you are hitting partial write and in what capacity (how many samples) -- on both caller and receiver. It's not trivial (complexity, efficiency) to now communicate back what exactly was not sent and why. Imagine now doubling the network cost and writing/receiving on failures, risking cascading failures. Instead we propose that servers, on partial response, ask for retry with all samples, on fails with the partial "retryable" errors. The server needs to be idempotent as described, even if it's a duplication failure for other samples in the batch (it's acceptable, but one could consider making duplicate sample a 200 e.g. in Thanos).

    Does this help?

  4. 71 remaining items

  5. bwplotka commented on Mar 4, 2026

    @bwplotka
    MemberAuthor

    Amazing! Thanks for the recent feedback.

    To me (feel free to object) the main points that are needed to make RW2 stable are:

    1. Last mile fixes for Prometheus RW2 implementation:
    1. Finalize sender compliance tests - they were mostly broken - fix in progress Overhaul remotewrite/sender tests compliance#208
    2. Decide on the solution to the response headers for "async decoding" receivers.

    Re some other discussions here:

  6. bwplotka commented on Mar 4, 2026

    @bwplotka
    MemberAuthor

    Let's unpack the response headers for "async decoding" receivers problem a little.

    The intention of response headers was to:

    1. Derisk common implementation bugs (RW2 request parsed as RW1)
    2. Allow implementations to pass the best possible write statistics to clients for transparent client side transaction accounting.

    Re (2) it's obvious it's not possible for all implementations. In fact it's likely not possible in most. Like imagine even Otel Collector - it receives and it's unlikely to expect RW2 receiver implementation to wait until all possible export paths returns 200 on every sample. That's exactly why we didn't define precisely what the "successful write is"

    Once completed (with success or failure) for each important piece of data (currently Samples, Histograms and Exemplars) Receivers MUST send a dedicated HTTP X-Prometheus-Remote-Write-*-Written response header with the precise number of successfully written elements.

    In practice it's for protocol communication reasons, so IMO it's totally ok if it the "write" mean only a succesful decoding of the proto, so (2) on @pracucci comment in this discussion:

    1. The number of samples/histograms/exemplars in the request that have been validated (e.g. formal validation, limits, ...) and persisted for later processing, but later processing may still skip some of them. This is how it works in Grafana Cloud / Mimir 3.0. In Grafana Cloud we have a Grafana Cloud specific async feedback loop to let the customer monitor, alert and get insights about the eventual async rejection.

    So the first improvement I propose is to clarify fact in the spec, so clients don't assume it means fully transactional write.

    The bigger problem occurs when even the decoding is async as in NewRelic
    . N/A or -1 is something we can add but I see 2 arguments against it:

    • My first instinct is that this way of receiving has quite many problems (debugging wise, clients learning about problems after too long time). It's like UDP vs TCP almost 🙃 -- but should RW protocol block businesses and maybe interesting new use cases by requiring basic decoding to happen before you return success? What if blocking this use case is beneficial because it forces receivers to ensure that basic communication reliance?

    • As @roidelapluie noticed N/A/-1 path has a risk of receivers ignoring this feature completely for lazy reasons. But again, should protocol guard clients against this forcefully?

      With the idea of "Written" header with "N/A", I believe it would remove the utility of "Written" headers as it would become a lot easier to simply reply "N/A" to every request, and in case of partial validation failure, the sender would not know how much successful
      metrics have been transferred.

    Given the above @rthorn-nr how hard (e.g. in score from 0 to 10) would it be for NewRelic to actually decode proto before responding with 200, given strong benefits to clients I mentioned above? Another solution is to add -1/N/A support to Prometheus, but don't mention it in the spec (common implementations being relaxed on this). We could also create a quick meeting to discuss this @roidelapluie @rthorn-nr WDYT?

  7. VihasMakwana commented on Mar 24, 2026

    @VihasMakwana

    @bwplotka I was reviewing the list of open issues and was wondering if you’re open to external contributions. I’d be glad to help move things forward where possible.

  8. bwplotka commented on Mar 24, 2026

    @bwplotka
    MemberAuthor

    Always! This list here should be up to date

  9. rthorn-nr commented on Mar 27, 2026

    @rthorn-nr

    Hey @bwplotka, apologies for the delay getting back to you on this. Unfortunately it'd be a 10/10 impossibility to decode the proto before sending a response due to architectural constraints at our edge from the volume of telemetry data we ingest.

    Re (2) it's obvious it's not possible for all implementations. In fact it's likely not possible in most.

    To me, this observation begs the question of why this requirement falls under MUST instead of SHOULD/MAY... giving the client the best possible statistics for accounting purposes sounds reasonable, especially for the partial write scenario, but given that it's not possible for all implementations, it sounds like something that arguably should be strongly encouraged rather than required.

    If this could indeed be downgraded to SHOULD/MAY, formal support could be added for async backends. Pardon my ignorance of the project, but how much of a priority is it for clients to receive the exact number of datapoints written, even with the loose definition of written that you mentioned? Does this substantially break the retry logic and/or other parts of the proposed spec?

    My first instinct is that this way of receiving has quite many problems (debugging wise, clients learning about problems after too long time). It's like UDP vs TCP almost 🙃

    That apt analogy really highlights the difference between synchronous and asynchronous backends. New Relic surfaces issues to customers through error reporting from within our telemetry pipeline, so clients sending telemetry data see only whether their request is successful (i.e. authorization is correct and request is accepted), and everything else (validation, normalization, pruning, etc) happens asynchronously.

    So in practice, we'd likely be receiving the request from the sender and returning 200 if authorization is successful, then if we find the proto is invalid when it is decoded, we would emit an error to the customer's account which would be a call to action to fix it on their end. I wouldn't be surprised if other large vendors in the field use a similar async model.

    Since there are benefits and tradeoffs to sync and async approaches, would you consider supporting different modes of operation? I think an optional mode of async support would give implementers some options.

  10. rthorn-nr commented on Jun 8, 2026

    @rthorn-nr

    Hey @bwplotka 👋, any updates on async backend support?

  11. sriharshabm commented on Jul 1, 2026

    @sriharshabm

    Hi all,

    We're currently using Remote Write v1. After reviewing the documentation and tickets related to Remote Write v2, it's clear that a number of performance improvements have been made on top of v1, and we're keen to migrate to v2.

    Since Remote Write v2 is still marked as experimental, could you please let us know the expected timeline for it reaching GA (General Availability)?

  12. bwplotka commented on Aug 4, 2026

    @bwplotka
    MemberAuthor

    While I think it would open room to ignoring validation where it shouldn't I think we need to enable flexibility to do fully async setups, it's getting more popular and discussed. Help wanted to adjust the protocol with this breaking change -- we need clients to support "N/A" in response headers or something similar.

  13. bwplotka commented on Aug 4, 2026

    @bwplotka
    MemberAuthor

    I will update this ticket with what's the latest, but this async support might be the most important change before GA.

  14. bwplotka commented on Aug 5, 2026

    @bwplotka
    MemberAuthor

    FYI: We have now weekly syncs to progress on this work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions