Вы находитесь на странице: 1из 21

Scalability and high availability

in the world of shared hosting

Igor Seletskiy,
CEO, CloudLinux
Is the topic still relevant?

Cloud vs Cluster
SAN vs NAS
Single server CP vs multi-server CP
VPS vs Shared Hosting
Scaling a site beyond single server
Cloud & Shared Hosting

Easy migrations
SAN ability to move to new hardware instantly
Grow your servers as needed
Out of the box CP (cPanel, Plesk)
Cloud Pitfalls

SAN
IO performance
Single point of failure
FSCK is still here
Hypervisor issues

Hypervisor System Failure Risks


Shared Hosting and Clustering
Load Balancer

Mail
NFS Shared Storage DB
Clustering - Benefits

Fault tolerance
No single point of failure
Scalability
Simplified backups
Clustering - Pitfalls

Complexity
Software failures
Configuration issues
Human Errors

Monitoring
Shared storage
No good control panel
Expensive
Shared Storage NFS is slow

Local Storage Shared Storage


Local NFS server
Open
Open
Read
Read Open
. Read
Close
Read

Close Read Open


Read
Close
Close
Shared Storage

No alternatives to NFS
GlusterFS, Lustre, etc
Sessions

Where to store?
Memcache
Disk
Session affinity
Single server CP vs cluster CP

Cluster CP are difficult to do & maintain


Home made CPs tend to get outdated
GoDaddy switched to cPanel
cPanel & Plesk have more features than any
clustered/home made CP
No 3rd party extensions
Scalability Why VPS?

Site using too much resources


Site needs specific software
VPS cannot solve scaling beyond single server
CloudLinux HA platform

Cluster
No NFS (no shared storage)
Fully compatible with cPanel
On Demand high availability
Site scalability beyond single server
General Arch

LB
cPanel Servers INTERNET

Web Appliances
C&C server

NGINX NGINX

C&C

Web Appliances Web Appliances Web Appliances cPanel cPanel


cPanel Server

1:1 NAT
Enable account for high availability

cPanel
WA Acc 1 WA
Acc 2
Acc 3
Acc 4
Web Appliance

Hold sites from multiple cPanel servers


Automatically replicate sites if needed

NGINX

C&C

WA WA
C2A1 C1A1
C1A2 C1A2
Web Appliance

weakly shared file system: Inotify & lsyncd


CageFS
PHP Selector / Python / Ruby
Sessions
MySQL (socat/smart library)
Crontab -> cPanel
Sendmail -> cPanel
Other external commands -> cPanel
Future Shared File System

Mostly reads
Writes are rare
Locks are rare, can be costly
Locks can be costly
Resolve conflicts in favor of any
Other Components

MySQL
Mail
Future

What we call today Shared hosting can grow into a


platform used to serve some of the most popular internet
resources

There should be no reason for a website


owner to move to VPS
If you want to learn more, talk to as at booth D20
? ?

Вам также может понравиться