Chapter 1: The Beginning of a Cloud Journey | 云端之旅的起点
Chapter 1: The Beginning of a Cloud Journey | 云端之旅的起点
The Dream of a Young Developer | 年轻开发者的梦想
The year was 2023, and in a small apartment in Shanghai, a young developer named Wei sat in front of his computer, staring at the metrics dashboard of his newly launched application. The numbers were modest—just a few hundred concurrent users, perhaps a thousand API calls per minute. Yet even this small scale brought his servers to their knees on more than one occasion. Users complained about slow response times. The application crashed during peak hours. And the server bills—those ever-increasing server bills—kept Wei up at night.
那是在2023年,在上海的一间小公寓里,一位名叫小伟的年轻开发者坐在电脑前,盯着他新上线的应用的数据面板。数字很不起眼——只有几百个并发用户,每分钟大约一千次API调用。然而,即使是这样小的规模,也让他的服务器不止一次地不堪重负。用户抱怨响应时间太慢,应用在高峰时段崩溃,而那些不断增加的服务器账单则让小伟夜不能寐。
"You see, I had this dream," Wei often recalled in his blog posts. "I wanted to build something that could touch millions of lives. Not just a hobby project or a demo, but a real system—a system that could handle whatever the world threw at it. A system that was reliable, that could scale up when needed, and scale down when demand was low. A system that didn't cost a fortune to maintain."
“你知道吗,我一直有一个梦想,”小伟经常在他的博客文章中回忆道。“我想构建一个能够影响数百万人生活的应用。不是一个业余项目或演示,而是一个真正能用的系统——一个能够应对世界抛给它任何挑战的系统。一个可靠的系统,一个可以在需要时扩展、在需求降低时收缩的系统。一个维护成本不会让人倾家荡产的系统。”
This dream, this seemingly simple aspiration, is the beginning of every cloud architect's journey. It's a journey that millions of developers around the world have embarked upon in the past two decades. And it's a journey that fundamentally changed how we build, deploy, and think about software systems.
这个梦想,这个看似简单的愿望,是每一位云架构师旅程的起点。这是过去二十年中全球数百万开发者踏上的旅程。这是一段从根本上改变了我们构建、部署和思考软件系统方式的旅程。
Wei didn't know it yet, but he was about to discover the world of cloud computing—and with it, a new paradigm for building software that would transform his career and his life.
小伟当时还不知道,他即将发现云计算的世界——以及一种全新的软件构建范式,这将会改变他的职业生涯和他的人生。
What Is Cloud Computing? | 什么是云计算?
Let's pause for a moment and answer the fundamental question: What exactly is cloud computing? Understanding this concept is essential for everything that follows in our journey.
让我们暂停一下,回答这个基本问题:究竟什么是云计算?理解这个概念对于我们接下来旅程中的一切都至关重要。
At its core, cloud computing is the delivery of computing services—including servers, storage, databases, networking, software, analytics, and intelligence—over the Internet (the "cloud") to offer faster innovation, flexible resources, and economies of scale. You typically pay only for cloud services you use, helping lower your operating costs, run your infrastructure more efficiently, and scale as your business needs change.
从本质上讲,云计算是通过互联网(“云”)交付计算服务的过程,包括服务器、存储、数据库、网络、软件、分析和智能,以实现更快速的创新、灵活的资源配置和规模经济效益。您通常只需为所使用的云服务付费,这有助于降低运营成本,更高效地运行基础设施,并根据业务需求的变化进行扩展。
A Brief History of the Cloud | 云计算的简要历史
To truly appreciate cloud computing, we need to understand its evolution. The concept of utility computing—treating computing as a public utility like electricity or water—dates back to the 1960s, when computer scientist John McCarthy famously stated that "computation may someday be organized as a public utility." However, it wasn't until the early 2000s that this vision began to materialize.
要真正理解云计算,我们需要了解它的演变过程。效用计算的概念——将计算视为像电力或水一样的公共设施——可以追溯到1960年代,当时计算机科学家约翰·麦卡锡曾著名地预言:“计算有一天可能被组织成一种公共设施。”然而,直到2000年代初期,这一愿景才开始成为现实。
Amazon Web Services (AWS), launched in 2002, is often credited as the first major cloud computing platform. Amazon realized that it had built massive data centers to handle peak shopping traffic during the holiday season, leaving much of this infrastructure idle for the rest of the year. In 2006, Amazon launched its Elastic Compute Cloud (EC2), allowing developers to rent virtual computers and pay for what they used. This was revolutionary—a fundamental shift in how businesses could access and pay for computing resources.
亚马逊网络服务(AWS)于2002年推出,通常被认为是第一个主要的云计算平台。亚马逊意识到,它建造了大型数据中心来处理假日购物季的峰值流量,但在一年中的大部分时间里,这些基础设施都处于闲置状态。2006年,亚马逊推出了弹性计算云(EC2),允许开发者租用虚拟计算机并按使用量付费。这是革命性的——这是企业获取和支付计算资源方式的根本性转变。
Google followed with Google App Engine in 2008, and Microsoft launched Azure in 2010. Today, the cloud computing market is dominated by three major players—AWS, Microsoft Azure, and Google Cloud Platform—though numerous other providers serve specific niches and regions.
谷歌于2008年推出了Google App Engine,微软于2010年推出了Azure。如今,云计算市场由三大巨头主导——AWS、微软Azure和谷歌云平台——尽管许多其他提供商也在特定领域和地区提供服务。
The Five Essential Characteristics | 云计算的五个基本特征
According to the National Institute of Standards and Technology (NIST), cloud computing is defined by five essential characteristics. Understanding these will help you evaluate any cloud offering and understand why cloud architecture differs from traditional infrastructure:
根据美国国家标准与技术研究院(NIST)的定义,云计算由五个基本特征定义。理解这些特征将帮助您评估任何云服务产品,并理解为什么云架构与传统基础设施不同:
1. On-Demand Self-Service (按需自助服务): Users can provision computing capabilities as needed without requiring human interaction with each service provider. Wei could spin up a new server instance with a few clicks—or even automatically through code—without waiting for an IT department or filing a ticket.
1. 按需自助服务:用户可以根据需要配置计算能力,而无需与每个服务提供商进行人工交互。小伟可以通过几次点击——甚至通过代码自动化——启动一个新的服务器实例,而无需等待IT部门或提交工单。
2. Broad Network Access (广泛的网络访问): Capabilities are available over the network and accessed through standard mechanisms that promote use by heterogeneous thin or thick client platforms. Wei's applications could be accessed from anywhere—his laptop, his phone, a client's office, or a beach in Bali.
2. 广泛的网络访问:能力通过网络提供,可通过标准机制访问,促进异构瘦客户端或胖客户端平台的使用。小伟的应用可以从任何地方访问——他的笔记本电脑、手机、客户办公室,或者巴厘岛的海滩上。
3. Resource Pooling (资源池化): Provider's computing resources are pooled to serve multiple consumers using a multi-tenant model, with different physical and virtual resources dynamically assigned and reassigned according to consumer demand. This is why cloud providers can offer such competitive pricing—they achieve efficiency through scale and resource sharing.
3. 资源池化:提供商的计算资源被池化以使用多租户模型为多个消费者提供服务,根据消费者需求动态分配和重新分配不同的物理和虚拟资源。这就是云提供商能够提供如此有竞争力价格的原因——他们通过规模和资源共享实现效率。
4. Rapid Elasticity (快速弹性): Capabilities can be elastically provisioned and released, in some cases automatically, to scale rapidly outward and inward commensurate with demand. To the consumer, the capabilities available for provisioning often appear unlimited and can be appropriated in any quantity at any time. Wei's application could handle a sudden surge of traffic without crashing.
4. 快速弹性:能力可以弹性地配置和释放,在某些情况下自动进行,以根据需求快速向外或向内扩展。对于消费者来说,可用于配置的能力通常看起来是无限的,可以随时以任何数量获取。小伟的应用可以处理突然的流量激增而不会崩溃。
5. Measured Service (可度量的服务): Cloud systems automatically control and optimize resource use by leveraging a metering capability at some level of abstraction appropriate to the type of service. Resource usage can be monitored, controlled, and reported, providing transparency for both the provider and consumer. Wei could see exactly how much computing power, storage, and bandwidth he was using—and only pay for what he consumed.
5. 可度量的服务:云系统通过利用适合服务类型的某种抽象级别的计量能力,自动控制和优化资源使用。资源使用可以被监控、控制和报告,为提供商和消费者提供透明性。小伟可以准确地看到他使用了多少计算能力、存储和带宽——并且只为他消耗的部分付费。
These five characteristics form the foundation of what makes cloud computing different from traditional hosting or data center infrastructure. They're not just marketing buzzwords—they represent fundamental capabilities that enable new architectural possibilities.
这五个特征构成了云计算不同于传统托管或数据中心基础设施的基础。它们不仅仅是营销术语——它们代表了一种能够实现新架构可能性的基本能力。
Understanding Service Models: IaaS, PaaS, and SaaS | 理解服务模型:IaaS、PaaS和SaaS
One of the first decisions any organization makes when moving to the cloud is choosing the appropriate service model. The three primary models—IaaS (Infrastructure as a Service), PaaS (Platform as a Service), and SaaS (Software as a Service)—represent different levels of abstraction and control. Understanding these models is crucial for making informed architectural