Background and Related project: eFit Aware IOS and Android Mobile Apps
eFit Aware - Android iPhone Mobile with Azure Cloud Sync
Introduction
Hybrid cloud architecture is one of those things that sounds fancy, but in reality, it’s just a way to mix on-premise computing with cloud services.
There are many reasons to not put everything in the cloud, and I once had a real-world use case for this.
The Problem: Our algorithms were highly sensitive, and we didn’t want to put even the compiled code on a cloud VM. The best solution? Keep our algorithm running on-premise while using the cloud for everything else.
This article will show how to build a similar hybrid cloud setup using the latest features in AWS, Azure, and Google Cloud.
What is a Hybrid Cloud?
A hybrid cloud is an IT architecture where some workloads run on-premise (your own servers) while others run in the public cloud (AWS, Azure, Google Cloud).
✅ Why Use a Hybrid Cloud?
- Security – Keep sensitive data/code on-prem.
- Performance – Keep high-speed processing local.
- Cost Savings – Reduce cloud costs for predictable workloads.
- Compliance – Some industries have regulations requiring on-premise storage.
How I Built a Hybrid Cloud Before Modern Cloud Services
Back in the day, I built a hybrid cloud system using an early version of Azure. It worked, but it was painful:
- We had a secret algorithm running on a local server in our office.
- Our cloud-based app called the on-premise server via a VPN.
- We manually managed connections.
Now, let’s do this properly with modern AWS, Azure, and Google Cloud.
The Hybrid Cloud Architecture
💡 Use Case: We will build a super-secret microservice that divides two numbers (yeah, real spy stuff 🕵️♂️).
📌 How it works:
- The secret division algorithm runs on-premise (Python & C# microservices).
- A public cloud microservice (AWS/Azure/GCP) acts as a proxy API.
- The cloud forwards API requests to the on-premise service.
Architecture Diagram
Step 1: Write the Super-Secret Microservice (Python & C#)
Python Version (Runs On-Prem)
|
|
C# Version (Runs On-Prem)
|
|
Step 2: Deploy the Microservice in Docker (On-Prem)
Create a Dockerfile:
|
|
Build and Run:
|
|
Now, we have our secret microservice running under my desk.
Step 3: Build the Cloud Proxy Microservice
Cloud Proxy Service (Python Flask)
|
|
Step 4: Deploy the Proxy Service in AWS, Azure, and Google Cloud
AWS: Use Elastic Beanstalk or Lambda + API Gateway
- Deploy the proxy microservice using AWS Elastic Beanstalk.
- Set up AWS API Gateway to expose it publicly.
- Configure AWS Site-to-Site VPN to connect to the on-prem service.
Azure: Use Azure App Service + VPN Gateway
- Deploy the proxy microservice to Azure App Service.
- Use Azure API Management to expose it.
- Configure Azure VPN Gateway to reach the on-prem service.
Google Cloud: Use Cloud Run + Hybrid Connectivity
- Deploy the proxy to Google Cloud Run.
- Expose it via Google API Gateway.
- Use Google Cloud Interconnect to talk to on-prem services.
Key Takeaways
- Hybrid Cloud = Best of Both Worlds → Security + Cloud Benefits.
- We kept our sensitive division algorithm on-prem while using cloud for API proxying.
- Modern hybrid cloud solutions (AWS VPN, Azure Hybrid Cloud, Google Interconnect) make this easy.