prometheus remote read handling of http redirects

37 views
Skip to first unread message

Johny

unread,
Jun 1, 2022, 10:35:56 AM6/1/22
to Prometheus Users
We use a custom remote read adapter for reading time series data from our storage backend. In process of transitioning to different backend, I want to temporarily redirect selected remote read requests (filter on date) to the new remote read adapter. Does Prometheus remote read support redirects as detailed in HTTP specification? I want to avoid adding another hop in forwarding time series responses via the old adapter.

current flow:
<prometheus>  
       ---grpc/http-->  <legacy_remote_read_adapter> 
                                             -----custom_protocol---> legacy_backend
new flow:
<prometheus>
       ---grpc/http-->  <legacy_remote_read_adapter> 
                                       (now <= T)  -----custom_protocol---> legacy_backend
                                       (now > T)    ----http/redirect to new adapter
                                                                    ---> new_remote_read_adapter  ---> new_backend
                                                                                   ---> ts directly to prometheus 

In the highlighted section of flow, I want to use redirect so the response is forwarded directly to prometheus from the new remote read adapter.





Julien Pivotto

unread,
Jun 1, 2022, 10:48:12 AM6/1/22
to Johny, Prometheus Users
If follow_redirect is true, it should work. This is the default value.

--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/5cfb460a-a262-4b18-b775-ecce02e8b571n%40googlegroups.com.

Johny

unread,
Jun 1, 2022, 11:58:31 AM6/1/22
to Prometheus Users
thanks!
Reply all
Reply to author
Forward
0 new messages