大网数据广告活动
网站运营与故障问答

Multiple web hosting for one domain?

· 52CE 我爱测

I'm wondering how you're supposed to manage a failure from your web hosting provider (server breakdown, ddos attack, server maintenance...) For instance, is it possible to host your website on multiple servers? I'm currently usin…

问题原文

原帖链接 · TheCat · CC BY-SA 3.0

I'm wondering how you're supposed to manage a failure from your web hosting provider (server breakdown, ddos attack, server maintenance...) For instance, is it possible to host your website on multiple servers? I'm currently using shared hosting with OVH, but it has already been down multiple times, and since I'm quite dependant on my website, I'd like to know what the good practices are to avoid a "single point a failure".

已采纳解答

原帖链接 · Stephen Ostermiller · CC BY-SA 3.0

Load balancers

Most large sites run on a set of servers behind a load balancer. This allows some of the servers to go down (or be taken down for maintenance) without taking the whole site down.

The load balancer is still a single point of failure, but load balancers generally have 99.99% uptime. They are single purpose machines tested against very high loads.

Failover DNS

Failover DNS monitors your primary server (or cluster behind a load balancer). When it detects a failure it points DNS to a separate backup site running in a different location.

Content delivery networks

CDNs act as distributed caching proxy servers for your website. They handle requests to your website via "edge nodes" located around the world. Each node will have to request the resource from your "origin" server on the first request and again periodically to pick up changes. CDNs help buffer against some types of DDOS attacks as well as reduce load on your origin server.

Monitoring

Whatever solutions you have in place, you need to get alerts when your website does go down. This will allow you to jump in and fix issues.

Staging servers

Releasing new versions of your website can occasionally be problematic. It helps to maintain a staging environment where new versions can run for a while before a live release. You would typically want to do both manual and automated tests against your staging environment.

Database synchronization

Sites that use a database will typically want to have a live database and a second backup database ready to go at each hosting location. This is usually accomplished by synchronizing databases by serializing all database transactions and replaying them to each database.

Sharding

Sharding is a technique of having different data live on different servers based on a hash of data key. In a robust sharding environment, data typically gets written to at least two locations for redundancy. Unlike database synchronization, not all servers have to have a copy of all of the data which allows sharding to more easily handle large data sets (terrabytes) that don't fit well in traditional relational databases.

Cloud hosting

Cloud hosting providers such as Amazon AWS typically offer all of these services. AWS even has Elastic Beanstalk technology that will add and remove servers automatically based on server load.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2017-11-26)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。