Built and deployed two .NET Microservices using the REST API pattern.
- Dedicated persistence layers for both services
- Deployed services to a Kubernetes cluster
- Employed the API Gateway pattern for routing
- Implemented synchronous messaging between services using HTTP and gRPC
- Built asynchronous messaging between services using an Event Bus (RabbitMQ)
- IaC and scripting for automated deployment and portability
- Cloud architecture and deployment on infrastructure
- .NET
- Apache
- AWS
- C#
- curl
- Docker
- gRPC
- k9s
- Kubernetes
- Kubetui
- Lazydocker
- Lazygit
- Linux
- localtunnel
- Microsoft SQL Server
- Minikube
- Nginx
- Posting
- RabbitMQ
- Swagger
- Shell
- Bash
- Zsh
- Telemetry
- Terraform
- S04E03---.NET-Microservices-Course-
- scholzj/aws-minikube
- cloud-formation-minikube
- Microsoft SQL Workshop
Diagram Illustrating Microservices Architecture and Communication
---
# title: Digram Illustrating Microservices Architecture and Communication
config:
theme: neutral
---
graph LR;
subgraph microServices[ ]
direction LR;
gateway( API Gateway )
%% connections
gateway <--> platformRestAPI
gateway <--> commandsRestAPI
platformService --HTTP \n Async Communication--> commandsRestAPI
commandsService --gRPC \n Retrieve and Sync Platforms--> platformService
platformService --Publish--> messageBus
messageBus --Subscribe--> commandsService
subgraph platform[ ]
subgraph platformService[ Platform Service ]
platformRestAPI( REST API )
end
platformDb[( SQL Server )]
end
subgraph messageBus[ RabbitMQ Message Bus ]
end
subgraph commands[ ]
subgraph commandsService[ Commands Service ]
commandsRestAPI( REST API )
end
commandsDb[( RAM )]
end
end
Diagram Illustrating Cluster Architecture of Microservices Deployments and Service Configurations
---
<!-- title: Diagram Illustrating Cluster Architecture of Microservices Deployments and Service Configurations -->
config:
theme: neutral
---
graph TD;
%% network interface
networkInterface( Network Interface )
networkInterface <--80--> ingressController
networkInterface <--8080--> nodePort
%% storage
storage( Physical Storage )
mssqlPersistentVolumeClaim <--> storage
%% minikube cluster
subgraph cluster[ Cluster ]
direction BT;
subgraph node[ Node ]
%% commands service
subgraph commandsPod[ Pod ]
commandsServiceContainer( Commands Service Container)
commandsClusterIP( Cluster IP)
end
commandsServiceContainer <--8080--> commandsClusterIP
commandsServiceContainer <--666--> commandsClusterIP
%% platforms service
subgraph platformsPod[ Pod ]
platformsServiceContainer( Platforms Service Container)
platformsClusterIP( Cluster IP)
platformsServiceContainer <--8080--> platformsClusterIP
platformsServiceContainer <--666--> platformsClusterIP
end
%% rabbitmq
subgraph rabbitmqPod[ Pod ]
rabbitmqContainer( RabbitMQ Container )
rabbitmqClusterIP( Cluster IP )
rabbitmqContainer <--5672--> rabbitmqClusterIP
rabbitmqContainer <--15672--> rabbitmqClusterIP
end
%% nginx
subgraph nginxPod[ Pod ]
nginxContainer( Nginx Container)
end
%% persistent volume Claim
mssqlPersistentVolumeClaim(Persistent Volume Claim)
mssqlPersistentVolumeClaim <--> mssqlContainer
%% mssql server
subgraph mssqlPod[ Pod ]
mssqlContainer[( MicrosoftSQL Server Container )]
mssqlClusterIP( Cluster IP)
mssqlContainer <--1433--> mssqlClusterIP
mssqlClusterIP <--> platformsClusterIP
end
%% node port
nodePort((Node Port ))
%% ingress controller
ingressController((Ingress Nginx Load Balancer ))
%% connections
platformsServiceContainer <--8080--> nodePort
nginxContainer <--80--> ingressController
nginxContainer <--8080--> platformsServiceContainer
nginxContainer <--8080--> commandsServiceContainer
platformsClusterIP <--Asynchronous--> commandsClusterIP
platformsClusterIP <--Synchronous--> commandsClusterIP
platformsClusterIP --5672--> rabbitmqClusterIP
rabbitmqClusterIP --5672--> commandsClusterIP
end
end
Diagram Illustrating A Single System Kubernetes Services Architecture
---
<!-- title: Diagram Illustrating A Single System Kubernetes Services Architecture -->
config:
theme: neutral
---
graph TB;
%% network hardware
internet((( Internet )))
gateway(( Gateway ))
%% connections
reverseProxy <--80--> networkInterface
networkInterface <--> firewall
firewall <--> gateway
gateway <--> internet
apiClient <--8080--> networkInterface <--8080--> nodePort
ingressController <--80--> reverseProxy
%% hardware
subgraph hardware[ Hardware ]
firewall( Firewall \n TCP 80 \n TCP 22)
networkInterface( Network Interface )
subgraph system[ Operating System ]
%% apache httpd proxy
reverseProxy( HTTPD Reverse Proxy )
%% development environment
subgraph devEnv[ Development Environment ]
configurations( Configuration Files && Manifests)
monitoring( Resource Monitoring )
project( Root Project )
apiClient( API Client )
end
%% docker
subgraph runtime[ Docker ]
%% minikube container
subgraph minikube[ Minkube ]
%% minikube cluster
subgraph cluster[ Cluster ]
direction BT;
%% cluster diagram
diagram(Services \n View Cluster Diagram)
%% node port
nodePort( Node Port )
%% ingress controller
ingressController( Ingress Nginx Load Balancer )
%% cluster diagram
nodePort <--> diagram
ingressController <--> diagram
end
end
end
end
end
Diagram Illustrating AWS Cloud Architecture of Single System Kubernetes Deployment
---
<!-- title: Diagram Illustrating AWS Cloud Architecture of Single System Kubernetes Deployment -->
config:
theme: neutral
---
graph TD;
%% styles
style user fill:#c46699,stroke:#333,stroke-width:4px
style dev fill:#415999,stroke:#333,stroke-width:4px
user( User )
dev( Developer / Engineer )
internet((( Internet )))
domain80( Domain / Public IP Address:80 )
domain22( Domain / IP Address:22 )
%% internet connecting to vpc through gateway
internet <--> internetGateway
internetGateway --> routeTable
%% user connecting to application running in ec2 instance
user --> domain80
domain80 --> internet
%% developer connecting to ec2 instance through ssh
dev --> domain22
domain22 --> internet
%% AWS cloud infrastructure
subgraph vpc[ Virtual Private Cloud]
internetGateway(( Internet Gateway ))
routeTable( Route Table \n 0.0.0.0/0 )
allPorts --> internetGateway
%% firewall redirecting traffic to their appropriate ports
routeTable -- Domain / IP Address:22 --> port22
routeTable -- Domain / IP Address:80 --> port80
subgraph subnet[ Subnet ]
subgraph firewall[ Security Group ]
%% ingress ports
port22( Port 22 TCP )
port80( Port 80 TCP )
%% egress ports
allPorts( Port 0 -1 )
port22 -- SSH Authentication --> ec2
port80 --> ec2
ec2 --> allPorts
subgraph ec2[ EC2 Instance \n View Cluster Diagram ]
end
end
end
end