Skip to content

A reference implementation of microservices architecture with cross-cutting concerns

License

Notifications You must be signed in to change notification settings

parameshg/krystal

Repository files navigation

Krystal

This is an sample project to showcase different aspects of a microservices architecture with an example of a real-world application. The application under this context is an URL shortener and a HTTP redirector system. Just like a regular crystal refracts or in some sense redirects light (as Wikipedia says, in physics, refraction is the change in direction of a wave passing from one medium to another or from a gradual change in the medium), this software Krystal shortens an URL and redirects HTTP requests for the shortened web resources to their original sources.

Table of contents

  • HTTP redirection fundamentals
  • System overview
  • Microservices and API design
  • Database design and ORM
  • Frontend design and UI layout
  • Auditing: Audit log storage and management using immutable database such as immudb
  • Availability: Clustering and high-availability of backend services in Docker Swarm and Kubernetes
  • Error handling: Centeralized error handling, management and notification
  • Fault tolerance: Fault tolerance using container orchestrators
  • Scaling: Scaling frontend and backend services using Docker and Kubernetes
  • CI/CD: Continous integration and continous deployment using GitHub Actions
  • DevOps: Provisioning Docker Swarm or Kubernetes cluster infrastructure using Terraform and configuration management using Ansible
  • Deployment: Deploying frondend and backend services into Docker Swarm and Kubernetes
  • Logging: Infrastructure and application logging using ElasticSearch, LogStash and Kibana
  • Caching: Distributed caching using Redis
  • Configuration: Configuration management and service discoverability using Consul
  • Monitoring: Monitoring services using Prometheus and Grafana
  • Packaging: Packaging frontend and backend services using Docker containers
  • Security: Authentication and authorization with IdentityServer and JWT tokens
  • Telemetry: Distributed tracing using OpenTelemetry and Zipkin