nopCommerce hosting with AWS

AWS Services

  1. CloudFront: Provides CDN caching for media content
  2. Internet Gateway: A VPC component that allows connection between internet and VPC
  3. NAT Gateway: A internet gateway inside VPC, services in private subnet uses NAT gateway to access internet.
  4. S3 Bucket: A Cloud Storage Service of AWS
  5. VPC: A virtual private cloud system, used to containerized AWS services
  6. Subnet: A component of VPC includes a range of IP Address inside VPC for accessibility
  7. EC2: A virtual machine on which a Operating System can be installed
  8. Availability Zone: These are isolated locations within a data center
  9. Load Balancer: A load balancer is responsible for managing load / traffic across servers
  10. Auto Scaling: This methodology is used to scale up instances dynamically under different metrics and constraints for better load distribution.
  11. RDS: A relational database management system service from AWS, provides wide verities of Database system to pick from.
  12. AWS CloudTrail: This is an AWS service that helps you enable governance, compliance, and operational and risk auditing of your AWS account.
  13. AWS CloudWatch: this is a monitoring and management service that provides data and actionable insights for AWS, hybrid, and on-premises applications and infrastructure resources
  14. Amazon Simple Notification Service: (Amazon SNS) is a fully managed messaging service for both application-to-application (A2A) and application-to-person (A2P) communication.


How cloud architecture works

AWS architecture diagram for nopCommerce

Figure : AWS Architecture Diagram for NopCommerce

  • DNS: Users will request to DNS server.
  • VPC: a vpc is responsible for managing a private cloud for the aws services we used, every service we use that communicates with the internet is assigned under a default vpc. A VPC is connected to the internet through an internet gateway. When users request to the dns server, the request is managed through the internet gateway and forwarded to specific services in the VPC. A vpc can consist of private and public subnets, services in public subnet can be accessible via the internet where services in private subnet are only accessible through the local network.
  1. Public Subnet: in our public subnet we have kept the EC2 Master node and NAT Gateway, Both Services in private subnet will use the NAT Gateway to communicate to the internet
  2. Private Subnet (EC2): for autoscaling purposes we have placed the scalable EC2 inside a private subnet
  3. Private Subnet (RDS): For security purpose we have placed the RDS inside another private subnet, nodes only inside the vpc will be able to communicate to it.
  • Scheduled Tasks ( EC2 ) : A Nopcommerce application may have many scheduled tasks , a instance handles its own scheduled task periodically after a fixed interval or manually from a system admin . Since the ec2 machine is the host for the system it will handle the schedule task in it’s own environment .
  • Load Balancer: An application Load Balancer is directly associated with the EC2 Master node, EC2 in the private subnet are configured to be auto scaled when certain metrics are met.
  • Auto Scaling: Autoscaling configuration is connected with the load balancer template. When autoscaling conditions are met, Instances are scaled out from the private subnet (EC2) using the AMI images.
  • S3: S3 is a cloud storage service of aws , We have used S3 bucket to keep and serve static media assets. Also, the plugins folder is synced with S3 via Corn Jobs with all EC2’s keeps syncing the Plugins Directory via this corn job
  • Availability zones:  High availability requires at least two availability zones. The idea is that only one zone will go down at a time: the proverbial backhoe cutting power and network cables. Since Amazon isolates the data centers for each availability zone. There fore using multiple availability zone will replicate used aws services also.
  • CloudFront: amazon CloudFront works as a cdn service for media contents. So, after a user request to the dns server, cloud front, before a request is redirected to the application server for our case EC2 machines, the request is first intercepted at an edge location cdn server, the CDN server checks that the response for this request is already cached or not.
    if not cached then the request is forwarded to the main server and the response from that main server is cached at the edge location and then the user is served from that edge location cached response. If another request is made and a cache is found then the cached is served. An internet gateway is used to manage the requests between our cloud services and CloudFront.
  • AWS CloudTrail: Sometimes we need to monitor or check which types of aws users has taken which types of services what amount of resources for this types of scenarios we use aws cloud trail, as actions taken by a user, role, or an AWS service are recorded as events in CloudTrail.
  • AWS CloudWatch: This enables us to monitor our complete stack (applications, infrastructure, and services) and leverage alarms, logs, and events data to take automated actions and reduce Mean Time to Resolution (MTTR). This frees up important resources and allows us to focus on building applications and business value.
  • Amazon Simple Notification Service: Amazon SNS helps us to simplify our application architecture and reduce costs. With message batching, publisher systems can send up to 10 messages in a single API request. With message filtering, subscriber systems receive only the messages that they are interested in.


Leave your comment
Only registered users can leave comments.
card icon