Introduction
Migrating infrastructure between cloud providers is not only about changing platforms – it’s about redesigning for performance, availability, and observability. This case study details how we transitioned a legacy system from AWS to GCP, modernizing the full stack while respecting budget constraints.
The Challenge
The client’s existing setup on AWS was unstable, unscalable, and under-documented. Key limitations included:
- No high availability or failover strategies
- No auto-healing or scaling logic
- Content was not delivered correctly across regional markets
- Lack of monitoring and logging
- Legacy PHP 5.4 codebase
- No documentation for infrastructure or application logic
Project Constraints
- Cost-optimized infrastructure (VM-based, no Kubernetes in this phase)
- No downtime during migration
- Cloud-native services where it made sense (e.g., database, logging)
The Solution
🧠 Strategy & Architecture
- Designed HA architecture using GCP Compute Engine instance groups, spread across multiple zones
- Introduced auto-scaling groups with “sleep mode” capability to reduce costs when traffic is low
- Implemented auto-healing via health checks and managed instance templates
- Used Google Cloud Load Balancer with smart routing to serve correct market-specific content based on region
⚙️ Modernization
- Fully upgraded the application code from PHP 5.4 → PHP 8.3, introducing static typing, improved performance, and security
- Introduced code versioning and CI/CD pipelines
📊 Observability
- Integrated a Geo-distributed ELK stack (Elasticsearch, Logstash, Kibana) for real-time, persistent log storage — independent of instance lifecycle
- Built Kibana dashboards showing:
- VM usage by geographic location
- Client source country
- Real-time detection of access from blacklisted countries
🧾 Documentation
- Created both High-Level (HLD) and Low-Level Design (LLD) documents for:
- Infrastructure modules
- Application architecture and behavior
- Migration playbooks and rollback procedures
Results
Metric | Before Migration | After Migration |
---|---|---|
Uptime | 93% avg. | 99.95%+ |
PHP Version | 5.4 | 8.3 |
Auto-healing | ❌ | ✅ |
Market localization | ❌ | ✅ |
Logging & monitoring | ❌ | ✅ |
Documentation | ❌ | ✅ (Full HLD/LLD) |
Cost savings | – | ~37% monthly |
Conclusion
This migration was not just a lift-and-shift – it was a strategic modernization project. The final infrastructure is scalable, resilient, observable, and cost-efficient, providing a robust foundation for future growth, including potential Kubernetes migration in later phases.
With the combination of updated source code, intelligent autoscaling, and centralized logging, the client now benefits from both operational visibility and market responsiveness – all while cutting costs.