Showing posts with label API Gateway. Show all posts
Showing posts with label API Gateway. Show all posts

Thursday, June 17, 2021

AWS, Azure - Load Balancer and API Management Tools

Azure

  • Azure Load balancer                          - Level 4 LB - Network Level TCP/IP
  • Azure Application Gateway               - Level 7 LB - App level routing
  • Azure API Management services        - API Management Tool


AWS

  • N/W Load Balancer                            - Level 4 LB   - TCP/IP Level
  • Application Load Balancer                  - Level 7 LB    - works with Https
  • Amazon API Gateway                         - API Management Tool


Azure API Management services  =   AWS Amazon API Gateway 

Thursday, March 11, 2021

API Gateway, Zuul

https://www.youtube.com/watch?v=1vjOv_f9L8I

An API gateway is a vital component in any microservice architecture. - An Edge Service
1 Microservice acts as a Gateway for rest of microservices


API Gateway is an abstraction layer - a FACADE
If We have microservices URL and those URLs are directly used by Client UI Developers
it would create issues later if we would like to change them in future.
So, We can have a FACADE Layer which would abstract real URLS

This can be achieved by Using API Gateway - A kind of Edge Service
Netflix has an open source library for this purpose called "Zuul"

API Composition - Making 1 Microservice out of many other
Single Point of Entry
Monitoring System for Requests/Responses

External Contract  ----------> Zuul Gateway ------> Internal Rest API
 
Advantages
  • Monitoring 
  • Authentication

Disadvantages & Mitigation Steps
  • Little bit Slow - 1 Additional Network Hop 
  • Single Point of Failure - You need to have multiple redundant Zuul Gateway  to overcome it
  • Backend for Frontend - Different Backend for Android, Apple, Web - Layers - Different API Gateway for Different Types of Frontend

Works on Filter Based Design Pattern
PreFilter
PostFilter
etc





Wednesday, March 10, 2021

Edge Services

 Any Service which is located close to user and which actually reduces latency by providing   CDN services, API Gateway, DDOS Prevention(Rate Limiting) - They are collectively called EDGE Services 

CDN  - Content Delivery Network
Throttle - DDOS Prevention
API Gateway 
Filtering 
Authentication
Logging



Cloud Design Patterns


API Gateway

(Forward)Proxy vs Reverse Proxy
https://www.youtube.com/watch?v=AuINJdBPf8I
(Forward)Proxy vs Reverse Proxy
Requests Going Out Via Proxy  -> Forward Proxy
Requests Coming In Via Proxy  -> Reverse Proxy
Reverse Proxy - Use cases : Security, Load Balancer , Caching 
Forward Proxy - Corporate Control, Logging, Monitoring, Cached Responses

Zuul
API Gateway
Edge Microservice -> Sits at the edge of Microservice Architecture, Very close to user input.
Edge Microservice is also known as API Gateway.
"Zuul" is an implementation of API Gateway.
API Gateway - is a Facade/Abstraction Layer at the very edge of Microservices Architecture , 
which handles incoming Requests

Eureka
Eureka - "Found it" in Ancient Greek
Archimedes said it!!!
Eureka is a Registry and LookUp Service which allows Microservice to know each other

Hystrix
Fault Tolerant Library from Netflix which Implements "Circuit - Breaker" Pattern
<!-- https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-hystrix -->
<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-hystrix</artifactId>
    <version>1.4.7.RELEASE</version>
</dependency>


How to configure SpringCloud Zuul – Routing and Filtering using SpringBoot | Java Techie
https://www.youtube.com/watch?v=6aG0xFpeNFw

Azure - Pipeline - Add Approver for Stage

https://learn.microsoft.com/en-us/azure/devops/pipelines/process/approvals?view=azure-devops&tabs=check-pass