Data Centres & Cloud
1. Cloud Computing
The cloud is a large pool of easily usable virtualized compute. It is the delivery of computing as-a-service. This gives speed, elasticity, security and customizability, however, it depends on the network connectivity, gives rise to privacy concerns, and has a cost and risk of vendor lock in.
We can have:
- Public cloud: all hardware & software is owned & operatted by a vendor. (e.g. AWS, Azure, GCP)
- Private cloud: all hardware & software is used exclusively by a single organization. (e.g. physically hosted data centre).
- Hybrid cloud: a combination of public and private clouds, allowing data and applications to be shared between them.
2. Service Models
Infrastructure-as-a-Service (IaaS) is immediately available computing infrastructure, provisioned and managed by a cloud proivder - essentially virtualized hardware. (e.g. AWS EC2, Azure VMs, GCP Compute Engine)
Platform-as-a-Service (PaaS) is a complete development and deployment environment. Includes OS, platforms, DBMs & libraries. Essentially just running a container. (e.g. AWS Elastic Beanstalk, Azure App Service, GCP App Engine)
Function-as-a-Service (FaaS) is a serverless computing model where the cloud provider manages the infrastructure and automatically scales the application based on demand. (e.g. AWS Lambda, Azure Functions, GCP Cloud Functions)
Software-as-a-Service (SaaS) is a software distribution model where applications are hosted by a third-party provider and made available to customers over the internet. (e.g. Google Workspace, Microsoft 365, Salesforce)
3. Data Centres
A physical facility to house computing and storage infrastrucutre in a networked format.
A datacentre needs redundancy in power (generators, UPS), cooling (air conditioning, liquid cooling), networking (multiple ISPs, redundant switches) and storage (RAID, replication). It also needs security (physical access control, surveillance, fire suppression).
The redundancy systems themselves may need to be redundant, and the datacentre may need to be geographically distributed to avoid single points of failure.
The total operating cost is the sum of capital expenditure (the cost of the physical infrastructure) and operational expenditure (the cost of running the datacentre, including power, cooling, maintenance, and staffing).
Power Usage Effectiveness (PUE) is the ratio of total energy used by a DC to the energy used by the compute equipment. A PUE of 1.0 is ideal, but most DCs have a PUE of 1.1-1.3.
To reduce costs, we could:
- Build in a location with lower costs (e.g. lower electricity costs, lower temperature climate).
- Raise temperature of aisles.
- Reduce conversion of energy (e.g. use 12V rather than 5V).
Energy consumption is not proportional to the amount of work done. A DC may consume 30% of its peak power even when idle. This is because servers are designed to be always on and always ready to handle requests, which requires a certain amount of power to maintain.
This means we should aim for higher utilization with fewer servers - i.e. virtualization.
4. Rack-Scale Computing
A rack is the new unit of deployment in a DC. The compute, storage and networking forms a compute unit (CU).