Giter VIP home page Giter VIP logo

sample-spring-cloud-gateway's Introduction

Spring Cloud Gateway Advanced Demo Project Twitter

CircleCI

SonarCloud Bugs Coverage Lines of Code


In this project I'm demonstrating you the most interesting features of Spring Cloud Gateway

Getting Started

Currently you may find here examples of:

  1. Redis-based Request Rate Limiter - the detailed description may be found in the article on my blog Rate Limiting In Spring Cloud Gateway With Redis
  2. Circuit Breaker and Fallback with resilience4j - the detailed description may be found in the article on my blog Circuit Breaking In Spring Cloud Gateway With Resilience4J

Usage

  1. To build and run the main application you need to have Maven, JDK11+ and Docker.
  2. To build it run command mvn clean install
  3. During Maven build the JUnit integration tests are running. They are using Testcontainers for mocking downstream service and third-party tools like Redis.

Feel free to propose your examples or suggestions !

sample-spring-cloud-gateway's People

Contributors

piomin avatar rajadilipkolli avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

sample-spring-cloud-gateway's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

circleci
.circleci/config.yml
  • cimg/openjdk 21.0.2
  • maven 1.4.1
maven
pom.xml
  • org.springframework.boot:spring-boot-starter-parent 3.2.5
  • org.testcontainers:mockserver 1.19.8
  • org.testcontainers:junit-jupiter 1.19.8
  • org.mock-server:mockserver-client-java 5.15.0
  • com.carrotsearch:junit-benchmarks 0.7.2
  • org.openjdk.jmh:jmh-core 1.37
  • org.openjdk.jmh:jmh-generator-annprocess 1.37
  • org.springframework.cloud:spring-cloud-dependencies 2023.0.1
  • org.jacoco:jacoco-maven-plugin 0.8.12

  • Check this box to trigger a request for Renovate to run again on this repository

Spring cloud gateway does not work with secure access and does not work with public access

Hello. My name is Valery. I found your an article:

https://piotrminkowski.com/2019/11/15/rate-limiting-in-spring-cloud-gateway-with-redis/

I tried to run, but I don’t understand that why don’t show an error when to occur rate limit to rest api.

GatewayRateLimiterTest - error 401 (authorization), which should not be
GatewaySecureRateLimiterTest - I only observe the success of requests, but I do not see errors when limiting requests.

In addition, I would like to clarify for myself (I did not find it in the documentation):
• how to change the error code to the address to which the response was sent that the resource is currently busy
• is it possible to collect statistics and see which IP generates more requests than our endpoint can handle
• the speed limit can only be configured via *.yml, or it can also be configured via Java, whereas ?
• as you can see in the tests. that the restriction is triggered and get details(for example, from which IP and how many requests and in what unit of time).
• I also didn't fully understand what the meaning of these parameters is:
key-resolver: "#{@userRemoteAddressResolver}"
redis-rate-limiter.replenishRate: 1
redis-rate-limiter.burstCapacity: 1

  • for example, I would like to know what is the number of requests in these parameters, and what is the unit of time in which this number of requests should work ?


https://github.com/alex-sky-cloud/spring-gateway.git

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.