question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to match serviceId and routeId

See original GitHub issue

rateLimit version 2.4.1 Here is my yml configuration.

ratelimit:
    key-prefix: ${spring.cloud.client.ip-address}:apiserv_rate_limit
    enabled: true
    repository: REDIS
    behind-proxy: true
    default-policy-list: #optional - will apply unless specific policy exists
      - limit: 10 
        quota: 1000 
        refresh-interval: 2000 
        type: 
          - url
    policy-list:
      cloud-currencyBackend:
        - limit: 10
          quota: 1000
          refresh-interval: 60
          type: #optional
            - url=/backend/currency/**
routes:
    cloud-currencyBackend:
      path: /backend/currency/**
      serviceId: currency-service
      stripPrefix: false

Every time while RateLimitProperties.getPolicies(key) execute , the key will be routeId likes /backend/currency/**. My policyList is serviceId : targetPolicy likes cloud-currencyBackend: some policy. Therefore the result of this method will always be defaultPolicyList.

How can I make this work ?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:20 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
lchayouncommented, Oct 22, 2020

is cloud-currencyBackend the name of the service that is serving the /backend/currency/** endpoints?

0reactions
ZoraZora59commented, Oct 25, 2020

The versions you’re using are not compatible with the 2.4.1.RELEASE version, you need to upgrade it to the latest spring-boot and spring-cloud versions

OK, I’ll try it on latest version. Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

8. Router and Filter: Zuul - Spring Cloud
Any regular expression is accepted, but all named groups must be present in both servicePattern and routePattern . If servicePattern does not match...
Read more >
How to properly execute LIKE and CASE clause in JPQL
I want to execute a query that works in sql but when I try to run it with the @Query annotation the program...
Read more >
kong/03-plugins_spec.lua at master - GitHub
route = bp.routes:insert({ service = { id = service.id }, ... "must match the protocols of at least one route pointing to this...
Read more >
RouteSummary - AWS Migration Hub Refactor Spaces
A list of HTTP methods to match. An empty list matches all values. If a method is present, only HTTP requests using that...
Read more >
GetRouteResponse.Builder (AWS SDK for Java - 2.17.290)
Indicates whether to match all subpaths of the given source path. GetRouteResponse.Builder ... routeId(String routeId) ... serviceId(String serviceId).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found