aleph-im / aleph-proxy

Load balances trafic to Aleph API and Compute nodes
0 stars 1 forks source link

Should we disable retry on POST/PUT methods? #13

Open aliel opened 2 years ago

aliel commented 2 years ago

regarding these => https://github.com/aleph-im/aleph-proxy/blob/main/aleph_proxy_config/config.yaml#L50 https://github.com/aleph-im/aleph-proxy/blob/main/aleph_proxy_config/config.yaml#L57

to-aleph-vm:  # Forward VM calls to all available Compute Resource Nodes in the network
  rule: "PathPrefix(`/vm/`)"
  service: aleph-vm
  middlewares:
    - retry-if-no-reply
...
  middlewares:
    retry-if-no-reply:
      retry:
        attempts: 4
        initialInterval: 5ms

as we know, it is almost never safe to retry a request that alters a state

hoh commented 2 years ago

Issue open upstream: https://github.com/traefik/traefik/issues/8990

This could also be achieved with a lot of duplication to use different routers, with and without retry, depending on the method used.