GithubHelp home page GithubHelp logo

microservice-aws-xray's Introduction

simple microservice example incl AWS XRay tracing

Microservice consisting of 3 different services:

  • jukebox => frontend, where clients are talking to, distributes requests to either metalapp or popapp based on request URI
    • metalapp => backend, returns a list of Metal artists
    • popapp => backend, returns a list of Pop artists

Each service also has a /ping endpoint, for e.g. container healthchecks.

The list of artists to be returned can be specified by ENV VAR ARTISTS= for both, metalapp as well as popapp.
Also as ENV VAR you can specify the port on which the service listens on, PORT= (default values: jukeboxapp: 9000, metalapp: 9001, popapp: 9002)

Containers

You can find the docker containers for the services on DockerHub:

Usage

If you offer the jukeboxapp directly to the internet, then just call http://<jukeboxapp-public-ip>:9000/ping to check if it is responding.
To request artists from the backend services, call

  • http://<jukeboxapp-public-ip>:9000/metal for a list of Metal artists
  • http://<jukeboxapp-public-ip>:9000/pop for a list of Pop artists

If you place a loadbalancer in front of the jukeboxapp, the URL to talk to jukeboxapp depends on the (port) forwarding rules of your loadbalancer. E.g. if your LB listens to port 80 and is forwarding traffic to the jukeboxapp on port 9000, then you'd call: http://<loadbalancer-public-dns>/ping to call the jukeboxapp healthcheck endpoint, and

  • http://<loadbalancer-public-dns>/pop to request a list of Pop artists
  • http://<loadbalancer-public-dns>/metal to request a list of Metal artists

microservice-aws-xray's People

Contributors

gkoenig avatar

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.