spring-cloud / spring-cloud/spring-cloud-gateway

Support other protocols in CircuitBreaker Fallback URI

Open
#764 12 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

waiting for votes
Dominant language
Java
Stars
4.9k
Forks
3.5k
Avg merge
20h 57m
Merged PRs (30d)
8

Description

spring:
  application:
    name: gateway-server
  cloud:
    gateway:
      discovery:
        locator:
          enabled: true
          lowerCaseServiceId: true
      routes:
      - id: service-hi
        uri: lb://SERVICE-HI
        predicates:
        - Path=/demo/**
        filters:
        - name: Hystrix
          args:
            name: fetchIngredientss
            fallbackUri: forward:/hi
      - id: ingredients-fallback
        uri: http://localhost:8888
        predicates:
        - Path=/hi

上面的配置经断路器可以跳转到http://localhost:8888/hi,但是如果把 http://localhost:8888改成lb://SERVICE-HI就不能跳转到SERVICE-HI/hi这个地址了 为什么

The above configuration can jump to http://localhost:8888/hi via circuit breaker, but if you change http://localhost:8888 to lb://SERVICE-HI, you can't jump to SERVICE-HI/hi address. Why?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the supplied Gateway configuration, comparing fallbackUri values of forward:/hi, http://localhost:8888, and lb://SERVICE-HI. Trace the CircuitBreaker fallback URI resolution and service lookup; done means the lb://SERVICE-HI fallback reaches SERVICE-HI/hi or the supported limitation is clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring, spring-boot
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.