Overview
Deployment Overview
Sisitech designed and implemented a robust infrastructure to meet the specific needs of our applications while ensuring scalability, security, and easy maintainability. This deployment leverages on Docker Swarm hosted on Hostinger.com across two key servers:
- KVM4 for database operations
- KVM2 for applications and monitoring functionalities.
Goal of the Deployment
The primary goal of this deployment was to create a seamless and efficient environment for running our web-based applications. The Django REST API, known as somapi, provides backend services and interacts with our frontend Angular application, somdash. This setup includes a comprehensive monitoring stack to ensure performance metrics are captured and visually represented for ongoing system health assessments.
High-Level Architecture
Our deployment architecture is built on a Docker Swarm environment to utilize containerization benefits such as easy scaling, isolation of services, and quick deployment cycles. The environment is split across two main servers:
-
KVM4 (Database Server): This server is solely dedicated to managing the PostgreSQL database. It is optimized for high availability and robust data handling capabilities. The database server does not participate in the Docker Swarm but is integral for storing all application data securely.
-
KVM2 (Application and Monitoring Server): This server hosts the Docker Swarm node and is the powerhouse of our operation. It runs several Docker stacks to manage not only the applications but also the monitoring tools necessary to maintain system health.
Docker Swarm Deployed Services(Stacks)
- Monitoring Stack: Includes Prometheus for metrics collection, Grafana for dashboard displays, cAdvisor for Docker metrics, and Node Exporter for OS and hardware metrics. This stack ensures that we have real-time insights into our deployment’s performance and can respond promptly to any anomalies.
- Django Rest API Stack (
somapi): Comprises four services—API service for request handling, a background worker for asynchronous tasks, Nginx for serving static and media files, and PgBouncer for efficient PostgreSQL connection pooling. - Angular Static Site Stack (
somdash): A single service running Nginx that serves our Angular application, ensuring fast content delivery and optimal user experience. - Traefik Stack: Acts as a reverse proxy and load balancer, dynamically routing requests to appropriate services. It supports SSL/TLS encryption via Let's Encrypt and includes a basic authentication mechanism to secure non-public endpoints.
- Uptime Monitoring Stack: Utilizes Uptime Kuma to monitor service availability and maintain historical uptime records, crucial for assessing the reliability of our services.