Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

API gateway and service discovery

Pragya Keshap answered on February 18, 2023 Popularity 6/10 Helpfulness 1/10

Contents


More Related Answers

  • Amazon API Gateway -Differences between REST - HTTP API
  • usage of API gateways
  • API Gateway
  • Main Reasons of Why should use API Gateway
  • API Gateway Pattern - Summarized
  • How does an API Gateway help to improve the performance of a microservice-based application ?
  • APIS - APIS THROUGH AN API GATEWAY LAYER
  • API gateway exposing your API securely
  • API Gateway for calling backend services
  • Architecture of API Gateway
  • call the Eureka API through the edge server to see what instances are currently registered in the discovery server
  • External API Gateway
  • Introducing an API gateway
  • API gateway performance and scalability
  • Edge server and API gateway
  • Which one is wrong about Api Gateway?
  • Service gateway#
  • Client gateway
  • Microservices Communications – API Gateways

  • API gateway and service discovery

    0

    In microservice-based architectures, all microservices use the IP address and port as the location of each microservice, which the API gateway needs to know in order to communicate. You could hardcoded the IP address and port of the microservice, but this is not as easy in the case of multiple instances of the same microservice. Fortunately, service discovery is a mechanism that allows you to register your microservices with a service registry server, such as Netflix's Eureka.

    There are two types of discovery mechanism: server-side discovery and client-side discovery. In the client-side discovery mechanism, the API gateway must be able to query the service registry server where all microservices are registered with their locations. In the server-side discovery mechanism, the client (such as an API gateway) requests the router deployed on another server, and that router then queries the service registry server.

    The client-side discovery mechanism has less overhead because it has fewer moving parts and network hops in comparison to server-side discovery, and is therefore preferable. An API gateway must be aware of the service registry mechanism being used. As the API gateway application is also registered with a registry server, such as Netflix's Eureka, let's look at the code required to register the application as follows:

    Popularity 6/10 Helpfulness 1/10 Language java
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Feb 18 2023
    Pragya Keshap
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.