Skip to content

Commit 9d833ea

Browse files
committed
2 parents 9ca48dd + 64d26dc commit 9d833ea

1 file changed

Lines changed: 67 additions & 0 deletions

File tree

‎README.md‎

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Stream-Seat: Cloud-Native Microservices Migration
2+
3+
## Project Overview
4+
**Stream-Seat** is a distributed microservices platform designed for real-time ticket booking. This project documents the transition from a localized development environment to a production-grade, serverless **AWS Cloud** infrastructure, focusing on high availability and secure service orchestration.
5+
6+
---
7+
8+
## Cloud Architecture (The "100% Infrastructure Milestone")
9+
The project has successfully reached full infrastructure deployment, transitioning from manual task management to a fully routed, discovery-aware microservices ecosystem.
10+
11+
### Current Infrastructure Components:
12+
* **Compute:** AWS ECS Fargate (Serverless) utilizing the **AMD64** runtime environment.
13+
* **Service Discovery:** **AWS Cloud Map** with Private DNS Namespaces (`stream-seat.local`) for stable, hostname-based internal routing.
14+
* **API Gateway:** **Spring Cloud Gateway** deployed in public subnets as the unified entry point for all external traffic.
15+
* **Database:** Amazon RDS (MySQL 8.0) isolated in private subnets with administrative access via **EC2 Bastion Hosts**.
16+
* **Networking:** Custom VPC with multi-AZ redundancy and **Security Group Nesting** for zero-trust inter-service communication.
17+
18+
19+
20+
---
21+
22+
## 🛠️ Technical Challenges & Solutions
23+
24+
### 1. Cross-Platform Container Compatibility
25+
* **Issue:** `CannotPullContainerError` due to ARM64 (Apple Silicon) vs. AMD64 (AWS Fargate) architecture mismatch.
26+
* **Fix:** Implemented **Docker multi-platform builds** using the `--platform linux/amd64` flag to ensure binary compatibility across development and cloud environments.
27+
28+
### 2. Private Database Orchestration & Schema Initialization
29+
* **Issue:** Security isolation prevented RDS schema creation, causing `SQLGrammarException` during service startup.
30+
* **Fix:** Utilized a **Bastion Host (EC2)** to bridge into the private subnet. Manually initialized the `stream_seat_db` schema to support Hibernate's DDL execution while maintaining a restricted database attack surface.
31+
32+
### 3. Non-Routable Link-Local Address Conflict
33+
* **Issue:** Fargate tasks registered with Eureka using `169.254.x.x` addresses, which are non-routable between different tasks, causing "Connection Refused" errors at the Gateway.
34+
* **Fix:** Configured **Spring Cloud InetUtils** via environment variables (`SPRING_CLOUD_INETUTILS_PREFERRED_NETWORKS=10.0`) to force services to register using their routable VPC Private IPs.
35+
36+
### 4. Ephemeral IP Management
37+
* **Issue:** Dynamic Fargate IPs broke hardcoded service links on every task restart, leading to frequent manual configuration updates.
38+
* **Fix:** Integrated **AWS Cloud Map** to provide a persistent Private DNS record (`eureka.stream-seat.local`), decoupling the registry location from its ephemeral IP address.
39+
40+
---
41+
42+
## 🚦 Deployment Status
43+
44+
| Service | Status | Port | Networking | Registry |
45+
| :--- | :--- | :--- | :--- | :--- |
46+
| **Discovery Server (Eureka)** | **RUNNING** | 8761 | Public Subnet | ECR (us-east-1) |
47+
| **API Gateway** | **RUNNING** | 8082 | Public Subnet | ECR (us-east-1) |
48+
| **Booking Service** | **RUNNING** | 8080 | Private Subnet | ECR (us-east-1) |
49+
| **Event Service** | **RUNNING** | 8081 | Private Subnet | ECR (us-east-1) |
50+
| **RDS MySQL** | **AVAILABLE** | 3306 | Private Subnet | AWS RDS |
51+
52+
---
53+
54+
## 📈 Future Roadmap (CI/CD)
55+
* [ ] **GitHub Actions Integration:** Automate the build-test-push cycle for all microservices.
56+
* [ ] **Automated Deployment:** Configure ECS task definitions to update automatically upon new image pushes.
57+
* [ ] **Secret Management:** Move AWS credentials and database passwords to **GitHub Secrets** and **AWS Secrets Manager**.
58+
59+
---
60+
61+
## 🛠️ Key Skills Demonstrated
62+
* **Cloud Orchestration:** Managing complex service lifecycles via AWS ECS and Cloud Map.
63+
* **Network Security:** Designing multi-tier VPCs and implementing **Bastion Host** architectures.
64+
* **Infrastructure Troubleshooting:** Debugging Link-Local networking and cross-architecture container issues.
65+
* **Externalized Configuration:** Utilizing Spring Boot environment variables to override production settings dynamically without image rebuilds.
66+
67+
---

0 commit comments

Comments
 (0)