Skip to content

Repository files navigation

Graph Based Cloud Cost Optimizer

CCO

Graph-Based Cloud Cost Optimization

Introduction

Cloud computing has revolutionized how we deploy and manage applications, but with this flexibility comes the challenge of managing costs effectively. In this post, I'll explore an innovative approach to cloud cost optimization using graph theory and mathematical modeling. We'll look at how representing cloud resources as a graph can help make smarter decisions about resource allocation and cost management.

References

Core Concepts

What Are We Trying to Solve?

The primary challenges in cloud cost optimization include:

  • Balancing resource utilization and costs
  • Managing data transfer costs between regions
  • Optimizing storage and compute resource placement
  • Handling dynamic workload requirements
  • Dealing with multi-cloud environments

Technical Implementation

1. Graph-Based Resource Modeling

GRM

2. Cost Modeling Framework

CRC


QOS


ECF


3. Optimization Techniques

A. Shortest Path Algorithm

DJK

B. Multi-Cloud Optimization

MCO

Conclusion

Graph-based cloud cost optimization provides a powerful framework for managing cloud costs effectively. By combining graph theory with advanced optimization techniques, we can make better decisions about resource allocation and cost management.

Setup

This project consists of a Spring Boot backend, a frontend, and a Neo4j database. Follow the steps below to build, set up, and run the application.

Prerequisites

Ensure you have the following installed:

  • Java (Version - 21)
  • Maven (Version - 3.9.9)
  • Docker (Version - 27.4.0)
  • Docker Compose (Version - 2.31.0)

Steps to Set Up the Application

1. Build the Backend

Navigate to the backend folder:

cd cloud-cost-optimizer-backend

Build the Spring Boot project using Maven:

mvn clean install

Build the Docker image for the backend:

docker build -t backend -f Dockerfile.backend .

2. Build the Frontend

Navigate to the frontend folder:

cd cloud-cost-optimizer-frontend

Build the Docker image for the frontend:

docker build -t frontend -f Dockerfile.frontend .

3. Deploy the Application

Navigate to the base folder:

cd ..

Run the following commands to start the services:

  1. Start the Neo4j database:

    docker-compose up -d neo4j
  2. Start the backend service:

    docker-compose up -d backend
  3. Start the frontend service:

    docker-compose up -d frontend

4. Configure the Database

Once Neo4j is up, access the Neo4j browser at:

http://localhost:7474/browser/

  • Log in using the default credentials.

  • Change the password if prompted.

  • Load the Cypher scripts available at the base folder:

    :source iot-based-manufacturing-platform.cql
    

5. Access the Application

Once all services are running, access the application in your browser at:

http://localhost:3000


Troubleshooting

  • Check logs for any errors using docker logs <container_name>.
  • Ensure all required ports are available and not in use by other services.
  • Verify that Docker Compose is installed and correctly configured.

Enjoy using the Cloud Cost Optimizer!

Others

Cloud Services

Service Type AWS Azure GCP
Compute EC2, Lambda, ECS, EKS, Fargate, Batch Virtual Machines, Functions, AKS, App Service, Batch Compute Engine, Cloud Functions, GKE, App Engine, Cloud Run
Storage S3, EBS, EFS, FSx, Glacier Blob Storage, Files, Disks, Archive Storage Cloud Storage, Persistent Disk, Filestore, Archive Storage
Database RDS, Aurora, DynamoDB, Redshift, DocumentDB, ElastiCache SQL Database, Cosmos DB, PostgreSQL, MySQL, MariaDB, Synapse, Table Storage Cloud SQL, Spanner, Bigtable, Firestore, Memorystore, BigQuery
Networking VPC, Direct Connect, Route 53, ELB, Transit Gateway VNet, ExpressRoute, Traffic Manager, Load Balancer VPC, Cloud Interconnect, Cloud DNS, Load Balancing
Security IAM, Cognito, KMS, GuardDuty, Security Hub Active Directory, Key Vault, Defender, Sentinel IAM, Cloud Identity, KMS, Security Command Center
AI/ML SageMaker, Rekognition, Comprehend, Bedrock Azure ML, Cognitive Services, Bot Service Vertex AI, AutoML, AI Platform, Vision AI, NLP API
Forecasting Amazon Forecast Azure AutoML Forecasting Vertex AI Forecasting
Analytics Athena, EMR, Glue, Quicksight Data Factory, Synapse, Power BI BigQuery, Dataflow, Dataproc, Looker
IoT IoT Core, IoT Greengrass, SiteWise IoT Hub, IoT Edge, Digital Twins IoT Core, IoT Edge
DevOps CodeBuild, CodePipeline, CodeDeploy Azure DevOps, GitHub Actions, Pipelines Cloud Build, Artifact Registry, Cloud Deploy
Hybrid Outposts, Snowball, Snowcone Azure Arc, Stack HCI Anthos, GKE Enterprise
Serverless Lambda, Step Functions, App Runner Functions, Logic Apps Cloud Functions, Cloud Run
Containers ECS, EKS, Fargate AKS, Container Apps, Service Fabric GKE, Cloud Run
Monitoring CloudWatch, X-Ray, Managed Grafana Azure Monitor, Log Analytics, Managed Grafana Cloud Monitoring, Managed Grafana
Messaging SQS, SNS, Kinesis, EventBridge, MSK Event Grid, Service Bus, Event Hubs, Managed Kafka Pub/Sub, Eventarc, Kafka
API API Gateway, AppSync API Management API Gateway, Apigee
Quantum Braket Quantum Service Quantum Service
Edge Wavelength, Local Zones Azure Edge Zones Google Distributed Cloud Edge
Backup Backup, Disaster Recovery Azure Backup, Site Recovery Backup and DR Service
VDI WorkSpaces, AppStream Windows Virtual Desktop Cloud Workstations

Graph Setup

IoT-Based Manufacturing Analytics Platform AWS IoT Core -> Kinesis -> MSK -> EMR -> DynamoDB -> S3 -> Redshift Azure IoT Hub -> Event Hubs -> Stream Analytics -> Databricks -> Cosmos DB -> Blob Storage -> Synapse Analytics GCP Pub Sub -> Dataflow -> BigQuery -> DataProc -> Firestore -> Cloud Storage

Global Finance Analytics Platform AWS Kinesis -> MSK -> EMR -> DynamoDB -> S3 -> Redshift Azure Event Hubs -> Stream Analytics -> Databricks -> Cosmos DB -> Blob Storage -> Synapse Analytics GCP Pub Sub -> Dataflow -> BigQuery -> DataProc -> Firestore -> Cloud Storage

Connected Vehicle Analytics Platform AWS IoT Core -> Kinesis -> MSK -> EMR -> DynamoDB -> S3 Azure IoT Hub -> Event Hubs -> Stream Analytics -> Cosmos DB -> Blob Storage -> Synapse Analytics GCP Pub Sub -> Dataflow -> BigQuery -> DataProc -> Cloud Storage

Smart Grid Analytics Platform AWS IoT Core -> Kinesis -> EMR -> Aurora -> S3 -> Timeseries Azure IoT Hub -> Event Hubs -> Stream Analytics -> Cosmos DB -> Blob Storage -> Postgresql GCP Pub Sub -> Dataflow -> BigQuery -> DataProc -> Big table -> Cloud Storage -> Cloud SQL

Smart City Operations Platform AWS IoT Core -> Kinesis -> EMR -> DynamoDB -> S3 -> RDS Azure IoT Hub -> Event Hubs -> Stream Analytics -> Cosmos DB -> Blob Storage -> Azure SQL GCP Pub Sub -> Dataflow -> BigQuery Firestore -> Cloud Storage -> Cloud SQL

Global Media Streaming Platform AWS Kinesis -> EMR -> DynamoDB -> S3 -> Aurora -> Media Converter Azure Event Hubs -> Databricks -> Cosmos DB -> Blob Storage -> SQL DB -> Media Encoder GCP Dataflow -> BigQuery -> DataProc -> Firestore -> Cloud Storage -> Media Transcoder

Smart Tourism AWS API Gateway -> ECS Fargate Clusters -> DynamoDB -> Aurora -> Elastic Cache -> Elastic Search -> Event Bridge Azure API Management -> AKS Cluster -> Cosmos DB -> Azure SQL -> Azure Search ->Event Grid GCP APigee -> GKE Cluster -> Fire store -> Cloud SQL -> Memory Store -> Pub/sub

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages