AWS has proved itself that it can handle any scale. drupal has proved that it can handle any amount of complexity. if we mix these two things together, any scale and any complexity. we can build such systems today.

Generally used services in drupal and aws

  1. Amazon EC2
  2. Amazon RDS for MariaDB
  3. Amazon ElastiCache
  4. Application Load Balancer
  5. S3 Standard
  6. Data Transfer
  7. Amazon CloudFront
  8. Amazon Elastic File System (EFS)

1. Amazon EC2

One-sentence description:
Amazon EC2 (Elastic Compute Cloud) provides scalable virtual servers in the cloud.

One-paragraph description:
Amazon EC2 (Elastic Compute Cloud) is a central part of Amazon's cloud computing platform, AWS. It allows users to rent virtual machines, known as instances, on which they can run their applications. EC2 provides a wide range of instance types optimized for different purposes, from general-purpose tasks to machine learning and high-performance computing. With features such as auto-scaling, users can automatically adjust the number of instances based on the demand, ensuring efficient utilization and cost management.

2. Amazon RDS for MariaDB

One-sentence description:
Amazon RDS for MariaDB offers managed MariaDB relational database servers in the cloud.

One-paragraph description:
Amazon RDS for MariaDB provides a fully managed relational database service that facilitates setting up, operating, and scaling a MariaDB instance in the cloud. With RDS, users can offload database administration tasks like backups, patch management, and failover to Amazon, ensuring high availability and security. It integrates seamlessly with other AWS services, offers automatic backups, and provides the ability to deploy replicas for read scalability and failover.

3. Amazon ElastiCache

One-sentence description:
Amazon ElastiCache is a managed caching service that supports Redis and Memcached.

One-paragraph description:
Amazon ElastiCache is a web service that simplifies deploying and operating an in-memory cache in the cloud. The service improves the performance of web applications by retrieving data from fast, managed, in-memory caches, instead of relying solely on slower disk-based databases. ElastiCache supports two popular open-source in-memory caching engines: Redis and Memcached. It handles routine maintenance tasks like patch management, network configuration, and failure recovery, allowing users to focus on their application logic.

4. Application Load Balancer

One-sentence description:
Application Load Balancer ensures the efficient distribution of incoming application traffic across multiple targets.

One-paragraph description:
Application Load Balancer (ALB) is a part of the Elastic Load Balancing family in AWS. It operates at the application layer and routes traffic to targets - such as Amazon EC2 instances, containers, and IP addresses - based on the content of the request. ALB is best suited for routing HTTP/HTTPS traffic and offers advanced request routing features, including host- and path-based routing. It's designed to handle millions of requests per second while maintaining ultra-low latencies.


5. S3 Standard

One-sentence description:
Amazon S3 Standard is a general-purpose object storage solution with high durability and availability.

One-paragraph description:
Amazon S3 Standard is a storage class within the Amazon Simple Storage Service (S3) that offers a highly durable, available, and scalable object storage infrastructure. It's designed for general-purpose storage of frequently accessed data, making it suitable for big data analytics, mobile and gaming applications, content distribution, and backups. With S3 Standard, data is stored redundantly across multiple devices and facilities, ensuring high durability and availability.

6. Data Transfer

One-sentence description:
Data Transfer refers to the movement of data into and out of AWS services.

One-paragraph description:
Data Transfer in AWS encompasses the costs associated with transferring data to and from AWS services, both within a region and between different regions. This includes data going out from an AWS service to the internet or to other AWS regions. Understanding and managing these costs is crucial for businesses, especially those with significant data transfer needs, as it can greatly impact the overall AWS bill.

7. Amazon CloudFront

One-sentence description:
Amazon CloudFront is a content delivery network (CDN) service that distributes content globally with low latency.

One-paragraph description:
Amazon CloudFront is AWS's content delivery network service that securely delivers data, videos, applications, and APIs to users globally with low latency and high transfer speeds. CloudFront is integrated with other Amazon Web Services, allowing developers and businesses to distribute content from AWS-backed origins like Amazon S3, Amazon EC2, or Elastic Load Balancing. Its features include DDoS protection, integration with AWS Shield, Lambda@Edge for customizing content, and geo-restriction capabilities.

8. Amazon Elastic File System (EFS)

One-sentence description:
Amazon EFS is a scalable file storage solution for use with Amazon EC2 instances.

One-paragraph description:
Amazon Elastic File System (EFS) provides a simple, scalable, fully managed elastic NFS (Network File System) that can be used with AWS Cloud services and on-premises resources. It's built to scale on-demand to petabytes without disrupting applications, growing and shrinking automatically as files are added or removed. EFS is designed to provide massively parallel shared access to thousands of Amazon EC2 instances, allowing applications to achieve high levels of aggregate throughput and IOPS.

AWS services in the context of Drupal Autoscale Setup

Setting up an auto-scaling Drupal instance involves multiple AWS services, each with its specific role. Let's break down the relevance of the services you've mentioned and their ideal settings in the context of a Drupal auto-scaling setup:

1. Application Load Balancer (ALB)

  • Relevance: ALB will distribute incoming application traffic across your EC2 instances. It ensures that each instance receives a balanced load, which is essential for a smooth user experience, especially during traffic spikes.
  • Ideal Settings:
    • Use HTTP/HTTPS listeners, given that Drupal is web-based.
    • Enable health checks to ensure traffic is only directed to healthy EC2 instances.
    • Implement SSL/TLS for secure content delivery.

2. Amazon EC2

  • Relevance: EC2 instances will host your Drupal application. They will serve the web pages, handle user requests, and interact with the database and cache.
  • Ideal Settings:
    • Choose instance types that are optimized for web applications, e.g., t3.medium or larger based on your expected load.
    • Enable Auto Scaling to automatically increase or decrease the number of instances based on traffic. Set up scaling policies based on CloudWatch metrics such as CPU utilization.
    • Ensure security groups are configured correctly to allow traffic from ALB and other necessary services.

3. Amazon RDS for MariaDB

  • Relevance: RDS will be the primary datastore for your Drupal application. All content, configurations, and user data will be stored here.
  • Ideal Settings:
    • Choose an instance type that can handle your database load, e.g., db.m5.large or similar.
    • Enable automated backups for disaster recovery.
    • Consider setting up Multi-AZ deployments for high availability.
    • Fine-tune database parameters specific to Drupal's requirements.

4. Amazon ElastiCache (Redis)

  • Relevance: Redis will be used as a cache backend for Drupal. It can store cached data like rendered HTML pages, reducing the load on the database and improving page load times.
  • Ideal Settings:
    • Choose a node type based on your caching needs, e.g., cache.m6g.large.
    • Use Redis as it offers data persistence and more advanced data structures compared to Memcached.
    • Ensure your Drupal setup is configured to use Redis as a cache with appropriate modules and configuration.

5. S3 Standard

  • Relevance: S3 can be used to store assets like images, videos, and other static files. With the right Drupal modules, you can offload these files to S3, reducing the load on your EC2 instances.
  • Ideal Settings:
    • Enable versioning to keep track of and retrieve all versions of an object.
    • Consider using CloudFront in front of S3 to serve static assets with lower latency.

6. Amazon CloudFront

  • Relevance: CloudFront can be used as a CDN in front of both your Drupal site (hosted on EC2) and your S3 bucket. It caches content closer to your users, reducing load times.
  • Ideal Settings:
    • Set appropriate cache durations for different types of content.
    • Use Origin Access Identity (OAI) for S3 origins to ensure content is only accessible via CloudFront.

7. Amazon Elastic File System (EFS)

  • Relevance: If you have shared files or configurations that need to be accessible across all EC2 instances, EFS can be a solution. For Drupal, it can be useful for shared file storage.
  • Ideal Settings:
    • Mount the EFS volume on all EC2 instances at a consistent directory.
    • Ensure necessary security groups and Network ACLs are in place.

General Recommendations:

  1. Security: Ensure all services are locked down with the appropriate security groups, IAM roles, and policies.
  2. Backup: Regularly back up RDS databases and EFS volumes.
  3. Monitoring: Use Amazon CloudWatch to monitor and set alarms for key metrics.

Remember, the "ideal" settings can vary based on specific use cases, expected traffic, and application requirements. It's essential to test the setup under expected loads and continuously monitor and adjust as needed.

helped by chatgpt

Rough TODO

Need to close the following things to be good at it. | | |---| |Drupal| |-- performance| |-- CI/CD in drupal| |-- understanding of the RAM usage| |-- New Relic| |-- Request Life Cycle| |-- Private and public files| || || |AWS| |-- EC2, Load Balancer, S3, EFS, Route 53, RDS, WAF| |-- Monitoring, Alerts, CloudWatch| |-- Create dashboard| |-- Choke points in the infra| |-- VPC| |-- RDS versus Aurora versus database in EC2| |-- Cost optimsation| |-- Cost calculator| |-- All the parameters in calculator and how does if affect the pricing and how do we derive these numbers from the client requirements or the current load| || |Drupal AWS| |-- RPM that we can support| |-- auto scaling and horizontal scaling| |-- Bottlenecks specific to Drupal and AWS| ||

    All notes