Hey ,
Im using traefick to split traffic to two other cloud run services.
Im trying to configure a retry middleware that if i get 404 traefick will retry again.
The reason of the 404 is that cloud instance is destroyed if no traffic arrive.
I can solve this issue if i prevent the cold start and configure instance to 1 and it will be always on but i want to save the billing by using traefick retry middleware
http:
middlewares:
test-retry:
retry:
attempts: 4
initialInterval: 150ms
# Add the router
routers:
router-http:
entryPoints:
- web
middlewares:
- test-retry
service: wrr1
rule: PathPrefix(`/`)
router-https:
entryPoints:
- websecure
middlewares:
- test-retry
service: wrr1
rule: PathPrefix(`/`)
tls: {}
# Add the middleware
# middlewares:
# my-basic-auth:
# basicAuth:
# users:
# - test:$apr1$H6uskkkW$IgXLP6ewTrSuBkTrqE8wj/
# - test2:$apr1$d9hr9HBB$4HxwgUir3HP4EsggP/QNo0
# usersFile: etc/traefik/.htpasswd
services:
wrr1:
weighted:
sticky:
cookie:
name: lvl1
services:
- name: whoami1
weight: 1
- name: whoami2
weight: 1
whoami1:
loadBalancer:
passHostHeader: false
sticky:
cookie:
name: lvl2
servers:
- url: https://YYYY.run.app/
# - url: https://ya.ru
whoami2:
loadBalancer:
passHostHeader: false
sticky:
cookie:
name: lvl2
servers:
- url: https://QQQQ.run.app