
Explore how to evolve a simple 3d architecture application into a full end-to-end, large-scale system running on your machine, tackling architectural challenges with modern architectures and open-source products.
Learn to build a large-scale system with Dockerized components, gateway routing, service discovery, and Kubernetes deployment on Google Cloud, plus observability via centralized logging and Prometheus.
Create a work environment on Google Cloud by renting a Linux Ubuntu machine with four CPU and 16 GB RAM, clone the codebase from Bitbucket, and install build tools.
Create a Linux workstation VM on Google Cloud by configuring a project and a Compute Engine instance with Ubuntu, 4 CPU, 16 GB RAM.
Clone the Bitbucket repository, install Python, Jdk, Maven, and Postgres, create the schema, run the build, and back up before running the application.
Run the system on a Google Cloud virtual machine to understand its three-tier architecture and current functionality. Explore its service oriented architecture, multi-service setup, and port management challenges.
Run a large-scale system on a Google Cloud Linux VM, start services with scripts, and deploy web and single-page apps. Open firewall ports and monitor health from login to orders.
Examine web app deployment architectures for static and dynamic content, including single-server and reverse-proxy models, using Apache or Nginx and Django, Rails, and Express framework.
Examine the Django web app codebase, including static assets, templates, and views, and see how the URL map routes to the orders view that fetches data from backend services.
Design services to be interoperable using rest for external and internal clients, with a gateway translating calls. Achieve independence and scalability by stateless services with separate schemas and databases.
Select Java with the Spring framework to build scalable services, using Spring Rest, Spring Data, and dependency injection via Spring Core, avoiding ORM and keeping Cassandra as an option.
Explore the java springboot service structure, including maven multi-module setup, api entry points, health checks, and decoupled business logic with environment variable-based configuration.
Evaluate open-source databases for large-scale transactions, comparing PostgreSQL with no sequel databases like Cassandra, noting aggregate transactions, normalization, data integrity, and the role of data warehouses for analytics.
Explore the PostgreSQL rdbms schema for a large-scale system. Identify authorization, product, cart, and order services with foreign keys and primary keys, and discuss the role of indexes.
Examine how single page applications run in the browser, fetch data via the REST interface, and deploy as hybrid mobile apps, then compare Angular, Vue.js, and React for selection.
Docker containers enable automated, consistent environment provisioning across development, test, and production, standardizing OS, software versions, and environment variables while enabling monitoring and automated restart of components.
Package a python web application with its jango and python dependencies into docker container images on ubuntu linux, enabling efficient, predictable starting and stopping of the system.
Learn how to dockerize a django web app by building an ubuntu-based image, installing python, copying the python archive, and running the container with docker compose.
Automate running a web application with docker compose, building a development image from dot web, and starting services in detached mode. View logs for the web service on port 8000.
Dockerize the postgres database using a Postgres image and docker compose, start the container with environment variables for username and password, and apply a create schema script at startup.
Dockerize java springboot services using one shared image that contains all service war files; launch each service by passing a service id to a common entry point script.
Dockerize a react single-page app with an engine x base image, copy the react build, apply an engine x configuration, and launch via docker compose on port 80.
Connect to the cloud machine and access via browser to verify all dockerized components run, sign in on the web app port 8000 and the single-page app port 80.
Create a docker network and volumes to simulate a distributed system on a single host, enabling services to communicate by hostnames and persisting data with volumes.
Configures a docker network and volumes to host data and logs, and maps container ports to the host. Uses docker compose to launch services and manage environment variables stored separately.
Containerisation with docker packages components in their OS environments via docker files and compose, documents environment variables, enabling consistent dev to production replication and lifecycle management with Kubernetes.
Examine routing challenges in large-scale systems and how a gateway service simplifies client configuration by routing requests via a central gateway (Nginx or Netflix Zuul) with Spring Cloud.
Explore the Netflix Zuul gateway service code and configuration, mapping routes to authorization and product services, using a config and filters for authentication, logging requests and responses, and heartbeat status.
Configure and start the gateway service via Docker Compose, override environment variables, and route client requests through the gateway to admin and authorization services, validating with health checks and UI.
Replace static routing with a discovery service that dynamically tracks service instances and health, enabling gateway, authorization, and order services to locate inventory and other components.
Learn to integrate Netflix Eureka discovery with a Spring Cloud setup, enabling services to register and discover each other via a discovery service, with docker and environment overrides.
Run and validate a large-scale system using Netflix Eureka discovery service to register clients, fetch registry data, and route requests via gateway and authorization services, deployed with Docker Compose.
Explore how server-side and client-side load balancing handle multiple instances for gateway service and web application, using discovery services, reverse proxies, and ribbon load balancer or engine-x for routing.
Implement a Netflix Ribbon client-side load balancer to fetch inventory service instances from a discovery registry and route requests using the default round-robin strategy.
Configure nginx and ribbon load balancers for a multi-service system, automate image builds, substitute host configurations via environment variables, and verify load balancing across gateway, web, and service instances.
Explore how to achieve observability in a large-scale system by implementing logging, tracing, and metrics to diagnose issues, audit activity, monitor latency, throughput, health, and resource utilization.
Centralize distributed application logs by deploying on-host agents that stream to a log collector and storage, enabling real-time analytics and reporting across large-scale systems.
Deploy Fluentd as the log collector and use the Docker driver to ship container logs to Elasticsearch, enabling high-throughput, immutable log storage analyzed with Kibana.
Increase the workstation capacity by upgrading to four CPUs and 16 GB memory, keep dependability on for cost control, then start the machine.
Configure and run an Elasticsearch, Fluentd, and Kibana (EFK stack) with Docker Compose, volumes, and restart policies to collect, store, and visualize logs from Docker services.
Deploy the Elasticsearch, Fluentd, Kibana stack to centralize logs, route stdout to Fluentd, and index messages in Elasticsearch. Use Kibana for full-text search and cross-service log analysis with sample orders.
Trace requests across a large scale system to pinpoint delays. Learn how to profile and connect component data to identify which API or component causes performance problems.
Instrument the core components with client libraries to record traces and send them to a centralized collector, enabling distributed tracing through a UI; compare Zipkin with a newer tracing platform.
Instrument components with client libraries to collect traces, deploy on-machine trace agents, and send data to a collector that stores in ElasticSearch, with Yegor Query available for browser-based exploration.
Learn how distributed tracing links a request across components by creating spans, propagating a Wilbert trace id header, and forming a full trace across downstream services.
Learn to instrument a web app and services with Jaeger, configure tracers, samplers, and adaptive options, and propagate trace context across synchronous and asynchronous messaging.
Configure Jaeger tracing in a microservices setup, run synchronous and asynchronous flows, and inspect traces from order, inventory, and gateway services to observe latency.
Learn how to monitor large-scale systems with Prometheus, exposing metrics from services and using exporters to track health, request rates, and resource utilization.
Enable Prometheus metrics across Spring services by configuring the framework to expose /actuator/prometheus on port 8080, and integrate Django Prometheus by installing the package, updating urls, middleware, and installed apps.
Configure Prometheus matrix monitoring in a docker-compose setup by adding environment variables, mapping the config, and using exporters for Postgres and ElasticSearch with service discovery and alert rules.
Launch and monitor a multi-container system using Prometheus. Observe exporters, metrics, alerts, and resource usage across services.
Explore how to scale web apps and services to handle high request and data volume, and examine database bottlenecks and data-architecture strategies to prevent overload.
Cache read-heavy data at the service level to reduce database load and improve performance, and refresh the cache on data changes using dynamic updates, time-to-live values, or batch approaches.
Compare Memcached and Redis for caching, noting Redis persistence and eviction policies like LRU; for a category's products, keep all items in cache to avoid database access.
Implement a redis cache in the product service by configuring the connection and template, fetching products from cache with database fallbacks, and managing expiry and invalidation to prevent stale data.
Run the system with Redis cache to speed up product data retrieval, verify cache hits via tracing, and observe reduced database load as data comes from cache.
Decouple write operations with asynchronous processing via a message queue, deferring order and inventory writes by right-oriented APIs like the ATA service, reducing database load and guiding user notifications.
Compare RabbitMQ and Kafka for large-scale systems, noting Kafka's horizontal partitioning and pull delivery, with ZooKeeper required and cross-partition order considerations. For moderate transactional loads, prefer the traditional queue.
Implement asynchronous processing in the order service using RabbitMQ, switching between local queue and every time queue, with serialized orders, producers, and consumers.
Configure a RabbitMQ setup within a docker-compose workflow, upgrading a host machine and running multiple order service instances with two consumers, exposing management and Prometheus metrics ports for monitoring.
Launch the RabbitMQ-based system, monitor services with Elasticsearch and Prometheus, and observe asynchronous order processing with two consumers that queue pre-processing and process orders as capacity allows.
The best way to learn software development is to write code. The best way to learn software architecture is to build and run a system. This is exactly what you are going to do as part of this course!
This course is the next in the series of Developer to Architect courses. The previous course 'Software Architecture & Technology of Large-Scale Systems' was focused on the concepts and principles of software architecture that govern modern large-scale systems.
This course 'Hands-On Implementation of Large-Scale Software Architecture', is focused on implementing those software and solution architecture principles in a mock large-scale system (mini system or simply minisys) by using open source technologies.
It starts with a downloadable code base of a mini system. We evolve this mini system into a full-fledged large-scale system implementation as we move along with the course. Our goal is to learn the typical architectural challenges that are faced by any large-scale system and solve these challenges using modern tools, technologies, and methods.
You can learn about these challenges and their solutions by actually working on a live system. For the same, you can download a mini system code-base provided by NewTechWays on Bitbucket or Github. You can follow the instructions to download, build and run this codebase. Although the instructions and code automation is platform-agnostic, this course will make use of Google Cloud Platform using a Linux machine as our test environment for building and running the system. Later we will put our system in a Production kind of environment using Kubernetes on Google Cloud Platform.
As we move along with this course we will cover the following architectural challenges and use the following technologies as their solutions:
3 Tier Application
Webapp – Python Django
RESTful Service – Java Spring Boot
Database – PostgreSQL & Cassandra
SPA - ReactJS
Containerization of System
Docker Containers
Docker Compose
Request Routing in Microservices
Discovery – Netflix Eureka
Gateway – Netflix Zuul
Client-Side Load Balancer – Ribbon
Server-Side Load Balancer - Nginx
System Observability
Logging – Elasticsearch, Fluent, Kibana
Tracing - Jaeger
Monitoring & Alerts – Prometheus
Large-scale Data Management
Caching - Redis
Asynchronous Processing - RabbitMQ
Horizontal Data Partitioning - Cassandra
Production Deployment
Cloud Deployment – Kubernetes on GCP
Auto-scaling – Kubernetes
High Availability - Kubernetes
Rolling Upgrades - Kubernetes