ecommerce

The ecommerce app simulates an ecommerce website.

Services

Unless otherwise noted, these services are implementations of the python-flask template service.

api-gateway

The api-gateway service is a proxy. Most services in the ecommerce app communicate with each other through the api-gateway service. This simplifies the microservices topology by requiring the services to be aware of only on service (in most cases). It also creates a predictable flow of communications among services, and in theory, a single place to manage access among services.

There are exceptions in which communications don't flow through the api-gateway service:

  • The web-gateway server communicates directly with the session-data service in addition to the api-gateway service.
  • The web-gateway client communicates directly with the web-gateway server.
  • The content service communicates with a public-internet GCP storage bucket to fetch images.
  • The synthetics service communicates directly with the web-gateway client.

cart-data

The cart-data service stores the products and quantities of carts for each session. The service is a redis server configured with a replica service (cart-data-replica) for high availability.

cart

The cart service creates, reads, updates, and deletes carts and products in the cart-data service via the api-gateway service.

checkout

The checkout service processes payments and, if successful, clears the cart. It communicates with the payment and cart services via the api-gateway service.

content

The content service fetches product images from a public-internet GCP bucket that hosts images for the ecommerce microbs app.

payment

The payment service simulates the processing of a payment. Currently it does this by waiting for a random period of time before returning an acknowledgement.

product-data

The product-data service is a product catalog that stores data about each product. The service is a PostgreSQL database.

product

The product service queries product data from the product-data service.

session-data

The session-data service stores session cookie identifiers that the web-gateway service uses to establish and persist session state. The service is a redis server configured with a replica service (session-data-replica) for high availability.

synthetics

The synthetics service generates traffic to the web-gateway client. Currently all traffic simulates the process of adding a product to a cart and then placing an order. The service uses k6 to simulate virtual user traffic.

web-gateway

The web-gateway service is a web server that serves a React application and brokers requests between the React application and the api-gateway service. The synthetics service interacts directly with the React application.

The web-gateway is given an external service on port 80 on Kubernetes so that human users can interact with the application.

© 2022 Dave Moore.
Licensed under the Apache License, Version 2.0.
This website uses Google Analytics.

microbs is a project of the open source community. microbs is not officially supported by any vendors named in this documentation or the software (e.g. Cloud Native Computing Foundation, Amazon, Google, Microsoft, Elastic, Grafana), though employees or partners of those vendors may contribute to the project.