Microservices

Spring Cloud Gateway Features

Reading Time: 4 minutes Spring Cloud Gateway provides a library for building an API Gateway on top of Spring WebFlux. Spring Cloud Gateway aims to provide a simple, yet effective way to route to APIs and provide cross cutting concerns to them such as: security, monitoring/metrics, and resiliency. Features Spring Cloud Gateway features: Built on Spring Framework 5, Project Reactor and Spring Boot 2.0 Able to match routes on Continue Reading

Spring Cloud API Gateway Global Filter Example

Reading Time: 3 minutes Global filters are executed for every route defined in the API Gateway. The main difference between pre-filter and post-filter class is that the pre-filter code is executed before Spring Cloud API Gateway routes the request to a destination web service endpoint. While the post-filter code will be executed after Spring Cloud API Gateway has routed the HTTP request to a destination web service endpoint. Let’s create a global pre-filter class Continue Reading

Spring Cloud Gateway Custom Filter

Reading Time: 4 minutes Spring Cloud Gateway Spring Cloud Gateway provides a library for building API gateways on top of Spring and Java. It provides a flexible way of routing requests based on a number of criteria, as well as focuses on cross-cutting concerns such as security, resiliency, and monitoring. An API gateway allows you to implement the complexity separately from the client, moving that responsibility from user side Continue Reading

Introduction of Spring Cloud Gateway

Reading Time: 4 minutes In a distributed environment, services need to communicate with each other. However, this is interservice communication. We also have use-cases where a client outside our domain wants to hit our services for the API. So, either we can expose the address of all our microservices which can be called by clients OR we can create a Service Gateway which routes the request to various microservices Continue Reading

Spring Cloud Gateway Global Filters

Reading Time: 3 minutes Filters act as the place where you can modify the incoming requests before sending the requests to the internal microservices or before responding back to the client.The GlobalFilter interface has the same signature as GatewayFilter. These are special filters that are conditionally applied to all routes. Forward Routing Filter The ForwardRoutingFilter looks for a URI in the exchange attribute ServerWebExchangeUtils.GATEWAY_REQUEST_URL_ATTR. If the URL has a Continue Reading

Spring Cloud Gateway Security with JWT

Reading Time: 3 minutes Security,As we all know that everything that is on the Internet need security. Especially when you create software and work with sensitive user data, such as emails, phone numbers, addresses, credit cards, etc.So,here we will go through securing API Gateway with Json Web Tokens(JWT). Spring recently released an update for microservice applications, and this update is a Spring Cloud Gateway that stands in front of all Continue Reading

Spring Cloud Gateway with Actuator API

Reading Time: 2 minutes Actuator Actuator is a library which is provides many beneficial features and are production-ready to be utilised in our application. The main features of this library include monitoring of the application, collection of metrics, traffic flow or the status of the database.The actuator mainly works in exposing operational information about the running application. It uses HTTP endpoints or JMX beans to enable the interaction. Actuator Continue Reading

Spring Cloud API Gateway: Custom Predicate Factory

Reading Time: 2 minutes Overview: Hello everyone, In this blog, we will deep down into routing predicate factories. Firstly we will know about what is a routing predicate factory? In a nutshell, a Predicate in Spring Cloud Gateway is an object that tests if the given request fulfills a given condition. For each route, we can define one or more prepositions. If satisfied, we accept requests for configured backend Continue Reading

UAA Server setup locally for Spring Cloud Gateway

Reading Time: 3 minutes For authenticate the users, we need two things: user account records and an OAuth2 compatible authentication provider (server). There are many commercial OAuth2 authentication providers out there, but in this blog, I’m going to with open-source Cloud Foundry’s User Account & Authentication Server.Spring Cloud Gateway can forward OAuth2 access tokens to the services it is proxying. In addition to logging in the user and grabbing Continue Reading

Spring Cloud Gateway security with JSON Web Tokens(JWT)

Reading Time: 4 minutes There is a clear understanding that everything that is exposed to the Internet should be secured. Especially when you create software and work with sensitive user data, such as emails, phone numbers, addresses, credit cards, etc. Here we will go through securing API Gateway with Json Web Tokens(JWT). As far as you probably know Spring recently released an update for microservice applications, and this update Continue Reading

Implementing API Gateway using Spring Cloud Gateway

Reading Time: 3 minutes Spring Cloud Gateway Spring Cloud Gateway(SCG) provides a library for building API gateways on top of Spring and Java. It aims to provide a simple, yet effective way to route to APIs and provide cross cutting concerns to them such as: security, monitoring/metrics, and resiliency. SCG is a non blocking API. When using non blocking API, a thread is always available to process the incoming Continue Reading

Spring Cloud Gateway Route Predicate Factories

Reading Time: 3 minutes Reverse Proxy The reverse proxy is a server used in communication between the external clients and the internal applications. With the help of reverse proxy the flow of the traffic between the clients and server become smooth and more efficient. Example of reverse proxy nginx. The main use of a reverse proxy server are : Load-Balancing Web Acceleration Security & Anonymity API Gateway The API Continue Reading

Differences between Netflix zuul and Spring cloud gateway

Reading Time: 3 minutes Routing is an integral part of a microservice architecture. For example, `/` may be mapped to your web application, `/api/users` is mapped to the user service and `/api/shop` is mapped to the shop service.  Netflix Zuul Zuul is a JVM-based router and server-side load balancer from Netflix. It provides a single entry to our system, which allows a browser, mobile app, or other user interface to consume services from multiple hosts Continue Reading