Bookinfo service architecture¶
Bookinfo is a sample application provided by Istio to demonstrate the capabilities of a Service mesh. It simulates a standard web-based bookstore application consisting of four microservices: productpage, details, ratings, and reviews^[400-devops__07-Monitoring-and-Observability__k8s-istio__samples__bookinfo__README.md].
This architecture is polyglot, with different microservices written in different programming languages^[400-devops__07-Monitoring-and-Observability__k8s-istio__samples__bookinfo__README.md].
Microservices¶
The application is composed of the following core services^[400-devops__07-Monitoring-and-Observability__k8s-istio__samples__bookinfo__README.md]:
- productpage: The Python-based entry point service. It calls the
detailsandreviewsservices to populate the page^[400-devops__07-Monitoring-and-Observability__k8s-istio__samples__bookinfo__README.md]. - details: A service written in Ruby that provides book information^[400-devops__07-Monitoring-and-Observability__k8s-istio__samples__bookinfo__README.md].
- reviews: A service written in Java that provides book reviews. This service depends on the
ratingsservice^[400-devops__07-Monitoring-and-Observability__k8s-istio__samples__bookinfo__README.md]. - ratings: A Node.js service that provides book rating information^[400-devops__07-Monitoring-and-Observability__k8s-istio__samples__bookinfo__README.md].
Service Interaction Flow¶
When the productpage microservice is invoked, it orchestrates calls to downstream services to render the complete webpage^[400-devops__07-Monitoring-and-Observability__k8s-istio__samples__bookinfo__README.md].
- The productpage service makes external calls to both the details service and the reviews service^[400-devops__07-Monitoring-and-Observability__k8s-istio__samples__bookinfo__README.md].
- The reviews service subsequently accesses the ratings service to retrieve rating data^[400-devops__07-Monitoring-and-Observability__k8s-istio__samples__bookinfo__README.md].
Versions and Variants¶
A key feature of the Bookinfo architecture used for demonstrating traffic management is the deployment of multiple versions of the reviews service^[400-devops__07-Monitoring-and-Observability__k8s-istio__samples__bookinfo__README.md].
- reviews-v1: Does not call the
ratingsservice. - reviews-v2: Calls the
ratingsservice and displays star ratings (1 to 5) with each review^[400-devops__07-Monitoring-and-Observability__k8s-istio__samples__bookinfo__README.md]. - reviews-v3: Calls the
ratingsservice and displays star ratings with additional red highlighting^[400-devops__07-Monitoring-and-Observability__k8s-istio__samples__bookinfo__README.md].
This allows users to verify routing behavior by observing the presence or absence of star ratings and red highlights in the UI^[400-devops__07-Monitoring-and-Observability__k8s-istio__samples__bookinfo__README.md].
Deployment and Verification¶
In a Kubernetes environment, the application components are deployed via specific manifests (e.g., platform/kube/bookinfo.yaml), creating Deployments for each service version and corresponding Services^[400-devops__07-Monitoring-and-Observability__k8s-istio__samples__bookinfo__README.md].
Deployment health can be verified by checking pod statuses. A fully deployed system should show pods for all versions running^[400-devops__07-Monitoring-and-Observability__k8s-istio__samples__bookinfo__README.md]:
$ [kubectl get pods](<./kubectl-get-pods.md>)
NAME READY STATUS RESTARTS AGE
details-v1-7f556f5c6b-485l2 2/2 Running 0 10m
productpage-v1-84c8f95c8d-tlml2 2/2 Running 0 10m
ratings-v1-66777f856b-2ls78 2/2 Running 0 10m
reviews-v1-64c47f4f44-rx642 2/2 Running 0 10m
reviews-v2-66b6b95f44-s5nt6 2/2 Running 0 10m
reviews-v3-7f69dd7fd4-zjvc8 2/2 Running 0 10m
Functionality can be validated by checking for the <title>Simple Bookstore App</title> response or by visually confirming the star ratings in the browser^[400-devops__07-Monitoring-and-Observability__k8s-istio__samples__bookinfo__README.md].
Sources¶
^[400-devops__07-Monitoring-and-Observability__k8s-istio__samples__bookinfo__README.md]