Skip to content

Latest commit

 

History

History

gateway-routing

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Gateway routing pattern

Unified interface to services

Gateway routing

Example

We have the following applications:

  • One app exposing a REST endpoint to fetch cats:
  • Another app exposing a gRPC endpoint to fetch a dog:
    • It is exposed at port 3000

We want to get be able to fetch the information of both cats and dog from REST endpoints.

Running the example

docker-compose up
# Calling this url will call the cat service
curl -L http://localhost/cats
# Calling this url will call the dog service
curl -L http://localhost/dogs/snoopy
# The client does not need to know every service domain names
# and he is only using one "protocol"

Sources