197 lines
25 KiB
HTML
197 lines
25 KiB
HTML
---
|
||
title: 案例研究:Zalando
|
||
case_study_styles: true
|
||
cid: caseStudies
|
||
|
||
new_case_study_styles: true
|
||
heading_background: /images/case-studies/zalando/banner1.jpg
|
||
heading_title_logo: /images/zalando_logo.png
|
||
subheading: >
|
||
欧洲领先的在线时尚平台通过云原生获得突破性进展
|
||
case_study_details:
|
||
- 公司: Zalando
|
||
- 位置: Berlin, Germany
|
||
- 行业: 在线时尚平台
|
||
---
|
||
<!--
|
||
title: Zalando Case Study
|
||
case_study_styles: true
|
||
cid: caseStudies
|
||
|
||
new_case_study_styles: true
|
||
heading_background: /images/case-studies/zalando/banner1.jpg
|
||
heading_title_logo: /images/zalando_logo.png
|
||
subheading: >
|
||
Europe's Leading Online Fashion Platform Gets Radical with Cloud Native
|
||
case_study_details:
|
||
- Company: Zalando
|
||
- Location: Berlin, Germany
|
||
- Industry: Online Fashion
|
||
-->
|
||
<!--
|
||
<h2>Challenge</h2>
|
||
-->
|
||
<h2>挑战</h2>
|
||
|
||
<!--
|
||
<p>Zalando, Europe's leading online fashion platform, has experienced exponential growth since it was founded in 2008. In 2015, with plans to further expand its original e-commerce site to include new services and products, Zalando embarked on a <a href="https://jobs.zalando.com/tech/blog/radical-agility-study-notes/">radical transformation</a> resulting in autonomous self-organizing teams. This change requires an infrastructure that could scale with the growth of the engineering organization. Zalando's technology department began rewriting its applications to be cloud-ready and started moving its infrastructure from on-premise data centers to the cloud. While orchestration wasn't immediately considered, as teams migrated to <a href="https://aws.amazon.com/">Amazon Web Services</a> (AWS): "We saw the pain teams were having with infrastructure and Cloud Formation on AWS," says Henning Jacobs, Head of Developer Productivity. "There's still too much operational overhead for the teams and compliance. " To provide better support, cluster management was brought into play.</p>
|
||
-->
|
||
<p>Zalando 是欧洲领先的在线时尚平台,自 2008 年成立以来,经历了指数级增长。在 2015 年,Zalando 计划进一步扩展其原有的电子商务站点,以扩展新的服务和产品,从而开始了<a href="https://jobs.zalando.com/tech/blog/radical-agility-study-notes/">彻底的变革</a>,因此形成了自主的自组织团队。这次扩展需要可以随工程组织的增长而扩展的基础架构。Zalando 的技术部门开始重写其应用程序,使其能够在云端运行,并开始将其基础架构从内部数据中心迁移到云。虽然编排没有立即被考虑,因为团队迁移到<a href="https://aws.amazon.com/">亚马逊网络服务</a>(AWS):“我们体验过团队在 AWS 上进行基础设施架构和使用云资源时遇到的痛苦,”开发人员生产力主管 Henning Jacobs 说,“我们遇到了一些难题。对于团队和合规性来说,运营开销仍然过多。为了提供更好的支持,项目引入了集群管理。”</p>
|
||
|
||
<!--
|
||
<h2>Solution</h2>
|
||
-->
|
||
<h2>解决方案</h2>
|
||
|
||
<!--
|
||
<p>The company now runs its Docker containers on AWS using Kubernetes orchestration.</p>
|
||
-->
|
||
<p>该公司现在使用 Kubernetes 编排在 AWS 上运行的 Docker 容器。</p>
|
||
|
||
<!--
|
||
<h2>Impact</h2>
|
||
-->
|
||
<h2>影响</h2>
|
||
|
||
<!--
|
||
<p>With the old infrastructure "it was difficult to properly embrace new technologies, and DevOps teams were considered to be a bottleneck," says Jacobs. "Now, with this cloud infrastructure, they have this packaging format, which can contain anything that runs on the Linux kernel. This makes a lot of people pretty happy. The engineers love autonomy."</p>
|
||
-->
|
||
<p>Jacobs 说,由于旧基础设施“很难正确采用新技术,而 DevOps 团队被视为瓶颈。”“现在,有了这个云基础架构,它们有了这种打包格式,可以包含任何在 Linux 内核上运行的东西。这使得很多人相当高兴。工程师喜欢自主。”</p>
|
||
|
||
<!--
|
||
{{< case-studies/quote author="Henning Jacobs, Head of Developer Productivity at Zalando" >}}
|
||
"We envision all Zalando delivery teams running their containerized applications on a state-of-the-art, reliable and scalable cluster infrastructure provided by Kubernetes."
|
||
{{< /case-studies/quote >}}
|
||
-->
|
||
{{< case-studies/quote author="Henning Jacobs, Zalando 开发人员生产力主管" >}}
|
||
<p>“我们设想所有 Zalando 交付团队在 Kubernetes 提供的最先进的、可靠且可扩展的集群基础架构上运行其容器化应用程序。”</p>
|
||
{{< /case-studies/quote >}}
|
||
|
||
<!--
|
||
{{< case-studies/lead >}}
|
||
When Henning Jacobs arrived at Zalando in 2010, the company was just two years old with 180 employees running an online store for European shoppers to buy fashion items.
|
||
{{< /case-studies/lead >}}
|
||
-->
|
||
{{< case-studies/lead >}}
|
||
当 Henning Jacobs 于 2010 年来到 Zalando 时,该公司刚成立两年,有 180 名员工经营一家网上商店,供欧洲消费者购买时尚商品。
|
||
{{< /case-studies/lead >}}
|
||
|
||
<!--
|
||
<p>"It started as a PHP e-commerce site which was easy to get started with, but was not scaling with the business' needs" says Jacobs, Head of Developer Productivity at Zalando.</p>
|
||
-->
|
||
<p>Zalando 的开发人员生产力主管 Jacobs 说:“它最初是一个 PHP 电子商务网站,很容易上手,但无法随业务需求扩展。”</p>
|
||
|
||
<!--
|
||
<p>At that time, the company began expanding beyond its German origins into other European markets. Fast-forward to today and Zalando now has more than 14,000 employees, 3.6 billion Euro in revenue for 2016 and operates across 15 countries. "With growth in all dimensions, and constant scaling, it has been a once-in-a-lifetime experience," he says.</p>
|
||
-->
|
||
<p>当时,公司开始从 Germany 以外扩展到其他欧洲市场。快进到今天,Zalando 现在拥有超过 14000 名员工,2016 年收入为 36 亿欧元,业务遍及 15 个国家/地区。他表示:“这种全面快速的增长和不断扩展,一生只能有一次。”</p>
|
||
|
||
<!--
|
||
<p>Not to mention a unique opportunity for an infrastructure specialist like Jacobs. Just after he joined, the company began rewriting all their applications in-house. "That was generally our strategy," he says. "For example, we started with our own logistics warehouses but at first you don't know how to do logistics software, so you have some vendor software. And then we replaced it with our own because with off-the-shelf software you're not competitive. You need to optimize these processes based on your specific business needs."</p>
|
||
-->
|
||
<p>能拥有像 Jacobs 这样的基础设施专家的机会是非常独特的。就在他加入公司后,公司开始在内部重写他们的所有应用。“这通常是我们的策略,”他表示。“例如,我们从我们自己的物流仓库开始,但起初不知道如何做物流软件,所以得用一些供应商软件。然后我们用自己的软件替换了它,因为使用现成的软件是没有竞争力的。需要根据特定业务需求优化这些流程。”</p>
|
||
|
||
<!--
|
||
<p>In parallel to rewriting their applications, Zalando had set a goal of expanding beyond basic e-commerce to a platform offering multi-tenancy, a dramatic increase in assortments and styles, same-day delivery and even <a href="https://www.zalon.de">your own personal online stylist</a>.</p>
|
||
-->
|
||
<p>在重写其应用程序的同时,Zalando 设定了一个目标,即从基本电子商务扩展到一个提供多租户、大量增加的分类和样式、当天送达,甚至<a href="https://www.zalon.de">你自己个人在线造型师</a>的平台。</p>
|
||
|
||
<!--
|
||
<p>The need to scale ultimately led the company on a cloud-native journey. As did its embrace of a microservices-based software architecture that gives engineering teams more autonomy and ownership of projects. "This move to the cloud was necessary because in the data center you couldn't have autonomous teams. You have the same infrastructure and it was very homogeneous, so you could only run your Java or Python app," Jacobs says.</p>
|
||
-->
|
||
<p>扩展的需求最终引领了公司踏上云原生之旅。它采用基于微服务的软件架构,使工程团队拥有更多的项目自主权和所有权。“迁移到云是必要的,因为在数据中心中,团队不可能随心所欲。使用相同的基础架构,因此只能运行 Java 或 Python 应用,”Jacobs 说。</p>
|
||
|
||
<!--
|
||
{{< case-studies/quote image="/images/case-studies/zalando/banner3.jpg" >}}
|
||
"This move to the cloud was necessary because in the data center you couldn't have autonomous teams. You have the same infrastructure and it was very homogeneous, so you could only run your Java or Python app."
|
||
{{< /case-studies/quote >}}
|
||
-->
|
||
{{< case-studies/quote image="/images/case-studies/zalando/banner3.jpg" >}}
|
||
“迁移到云是必要的,因为在数据中心中,团队不可能随心所欲。使用相同的基础架构,因此只能运行 Java 或 Python 应用。”
|
||
{{< /case-studies/quote >}}
|
||
|
||
<!--
|
||
<p>Zalando began moving its infrastructure from two on-premise data centers to the cloud, requiring the migration of older applications for cloud-readiness. "We decided to have a clean break," says Jacobs. "Our <a href="https://aws.amazon.com/">Amazon Web Services</a> infrastructure was set up like so: Every team has its own AWS account, which is completely isolated, meaning there's no 'lift and shift.' You basically have to rewrite your application to make it cloud-ready even down to the persistence layer. We bravely went back to the drawing board and redid everything, first choosing Docker as a common containerization, then building the infrastructure from there."</p>
|
||
-->
|
||
<p>Zalando 开始将其基础架构从两个内部数据中心迁移到云,这需要迁移较旧的应用程序使其在云中准备就绪。“我们决定果断一些,” Jacobs 说。“我们的<a href="https://aws.amazon.com/">亚马逊网络服务</a>基础设施是这样的:每个团队都有自己的 AWS 账户,该账户是完全隔离的,这意味着没有'提升和转移'。基本上必须重写应用程序,使其在云中准备就绪,甚至到持久层也是如此。我们勇敢地回到绘图板,重做一切,首先选择 Docker 作为通用容器化,然后从那里构建基础结构。”</p>
|
||
|
||
<!--
|
||
<p>The company decided to hold off on orchestration at the beginning, but as teams were migrated to AWS, "we saw the pain teams were having with infrastructure and cloud formation on AWS," says Jacobs.</p>
|
||
-->
|
||
<p>公司最初决定推迟编排,但随着团队迁移到 AWS,“我们看到团队在 AWS 上的基础设施和使用云资源方面遇到了难题,” Jacobs 说。</p>
|
||
|
||
<!--
|
||
<p>Zalandos 200+ autonomous engineering teams decide what technologies to use and could operate their own applications using their own AWS accounts. This setup proved to be a compliance challenge. Even with strict rules-of-play and automated compliance checks in place, engineering teams and IT-compliance were overburdened addressing compliance issues. "Violations appear for non-compliant behavior, which we detect when scanning the cloud infrastructure," says Jacobs. "Everything is possible and nothing enforced, so you have to live with violations (and resolve them) instead of preventing the error in the first place. This means overhead for teams—and overhead for compliance and operations. It also takes time to spin up new EC2 instances on AWS, which affects our deployment velocity."</p>
|
||
-->
|
||
<p>Zalando 200 多人的自主工程团队研究使用哪些技术,并可以使用自己的 AWS 账户操作自己的应用程序。事实证明,此设置是一项合规性挑战。即使制定了严格的游戏规则和自动化的合规性检查,工程团队和 IT 合规性在解决合规性问题方面也负担过重。Jacobs 说:"违规行为会出现,我们在扫描云基础架构时会检测到这些行为。“一切皆有可能,没有强制实施,因此你必须忍受违规行为(并解决它们),而不是一开始就防止错误。这些都会增加团队的开销,以及合规性和操作的开销。在 AWS 上启动新的 EC2 实例也需要时间,这会影响我们的部署速度。”</p>
|
||
|
||
<!--
|
||
<p>The team realized they needed to "leverage the value you get from cluster management," says Jacobs. When they first looked at Platform as a Service (PaaS) options in 2015, the market was fragmented; but "now there seems to be a clear winner. It seemed like a good bet to go with Kubernetes."</p>
|
||
-->
|
||
<p>Jacobs 说,团队意识到他们需要“利用从集群管理中获得的价值”。当他们在 2015 年首次将平台视为服务(PaaS)选项时,市场是支离破碎的;但“现在似乎有一个明确的赢家。使用 Kubernetes 似乎是一个很好的尝试。”</p>
|
||
|
||
<!--
|
||
<p>The transition to Kubernetes started in 2016 during Zalando's <a href="https://jobs.zalando.com/tech/blog/hack-week-5-is-live/?gh_src=4n3gxh1">Hack Week</a> where participants deployed their projects to a Kubernetes cluster. From there 60 members of the tech infrastructure department were on-boarded - and then engineering teams were brought on one at a time. "We always start by talking with them and make sure everyone's expectations are clear," says Jacobs. "Then we conduct some Kubernetes training, which is mostly training for our CI/CD setup, because the user interface for our users is primarily through the CI/CD system. But they have to know fundamental Kubernetes concepts and the API. This is followed by a weekly sync with each team to check their progress. Once they have something in production, we want to see if everything is fine on top of what we can improve."</p>
|
||
-->
|
||
<p>Kubernetes 的过渡始于 2016 年 Zalando 的<a href="https://jobs.zalando.com/tech/blog/hack-week-5-is-live/?gh_src=4n3gxh1">极客周</a>期间,参与者将他们的项目部署到 Kubernetes 集群。60 名技术基础设施部门的成员开始使用这项技术,之后每次会加入一支工程团队。Jacobs 说:“我们总是从与他们交谈开始,确保每个人的期望都清晰。然后,我们进行一些 Kubernetes 培训,这主要是针对我们的 CI/CD 设置的培训,因为我们的用户界面主要通过 CI/CD 系统。但是他们必须知道 Kubernetes 的基本概念和API。之后每周与每个团队同步,以检查其进度。一旦出现什么状况,就可以确定我们所做的改进是否正常。”</p>
|
||
|
||
<!--
|
||
{{< case-studies/quote image="/images/case-studies/zalando/banner4.jpg" >}}
|
||
Once Zalando began migrating applications to Kubernetes, the results were immediate. "Kubernetes is a cornerstone for our seamless end-to-end developer experience. We are able to ship ideas to production using a single consistent and declarative API," says Jacobs.
|
||
{{< /case-studies/quote >}}
|
||
-->
|
||
{{< case-studies/quote image="/images/case-studies/zalando/banner4.jpg" >}}
|
||
一旦 Zalando 开始将应用迁移到 Kubernetes,效果立竿见影。“Kubernetes 是我们无缝端到端开发人员体验的基石。我们能够使用单一一致且声明性的 API 将创意运送到生产中,” Jacobs 说。
|
||
{{< /case-studies/quote >}}
|
||
|
||
<!--
|
||
<p>At the moment, Zalando is running an initial 40 Kubernetes clusters with plans to scale for the foreseeable future. Once Zalando began migrating applications to Kubernetes, the results were immediate. "Kubernetes is a cornerstone for our seamless end-to-end developer experience. We are able to ship ideas to production using a single consistent and declarative API," says Jacobs. "The self-healing infrastructure provides a frictionless experience with higher-level abstractions built upon low-level best practices. We envision all Zalando delivery teams will run their containerized applications on a state-of-the-art reliable and scalable cluster infrastructure provided by Kubernetes."</p>
|
||
-->
|
||
<p>目前,Zalando 正在运行最初的 40 个 Kubernetes 集群,并计划在可预见的将来进行扩展。一旦 Zalando 开始将申请迁移到 Kubernetes,效果立竿见影。“Kubernetes 是我们无缝端到端开发人员体验的基石。我们能够使用单一一致且声明性的 API 将创意运送到生产中,” Jacobs 说。“自愈基础架构提供了无摩擦体验,基于低级最佳实践构建了更高级别的抽象。我们设想所有 Zalando 交付团队都将在 Kubernetes 提供的最先进的可靠和可扩展集群基础架构上运行其容器化应用程序。”</p>
|
||
|
||
<!--
|
||
<p>With the old on-premise infrastructure "it was difficult to properly embrace new technologies, and DevOps teams were considered to be a bottleneck," says Jacobs. "Now, with this cloud infrastructure, they have this packaging format, which can contain anything that runs in the Linux kernel. This makes a lot of people pretty happy. The engineers love the autonomy."</p>
|
||
-->
|
||
<p>Jacobs 说,使用旧的内部基础设施,“很难正确采用新技术,而 DevOps 团队被视为瓶颈。”“现在,有了这个云基础架构,它们有了这种打包格式,可以包含运行在 Linux 内核中的任何内容。这使得很多人相当高兴。工程师喜欢自主性。”</p>
|
||
|
||
<!--
|
||
<p>There were a few challenges in Zalando's Kubernetes implementation. "We are a team of seven people providing clusters to different engineering teams, and our goal is to provide a rock-solid experience for all of them," says Jacobs. "We don't want pet clusters. We don't want to have to understand what workload they have; it should just work out of the box. With that in mind, cluster autoscaling is important. There are many different ways of doing cluster management, and this is not part of the core. So we created two components to provision clusters, have a registry for clusters, and to manage the whole cluster life cycle."</p>
|
||
-->
|
||
<p>在 Zalando 的 Kubernetes 实施中出现了一些挑战。Jacobs 说:“我们是一支由七人组成的团队,为不同的工程团队提供集群,我们的目标是为所有团队提供坚如磐石的体验。”“我们不想要宠物集群。我们不想了解他们的工作量;它应该只是开箱即用。考虑到这一点,集群自动缩放非常重要。执行集群管理的方法有很多种,这不是核心的一部分。因此,我们创建了两个组件来预配集群,具有集群的注册表,并管理整个集群生命周期。”</p>
|
||
|
||
|
||
<!--
|
||
<p>Jacobs's team also worked to improve the Kubernetes-AWS integration. "Thus you're very restricted. You need infrastructure to scale each autonomous team's idea." Plus, "there are still a lot of best practices missing," says Jacobs. The team, for example, recently solved a pod security policy issue. "There was already a concept in Kubernetes but it wasn't documented, so it was kind of tricky," he says. The large Kubernetes community was a big help to resolve the issue. To help other companies start down the same path, Jacobs compiled his team's learnings in a document called <a href="http://kubernetes-on-aws.readthedocs.io/en/latest/admin-guide/kubernetes-in-production.html">Running Kubernetes in Production</a>.</p>
|
||
-->
|
||
<p>Jacobs 的团队还致力于改进 Kubernetes-AWS 集成。“由于许多限制条件,需要通过基础设施来扩展每个自主团队的想法。”此外,“仍然缺少很多最佳实践,” Jacobs 说。例如,该团队最近解决了 pod 安全策略问题。“在 Kubernetes 已经有一个概念,但没有记录,所以有点棘手,”他说。大型的 Kubernetes 社区是解决这个问题的一大帮助。为了帮助其他公司走上同样的道路,Jacobs 在一份名为<a href="http://kubernetes-on-aws.readthedocs.io/en/latest/admin-guide/kubernetes-in-production.html">在生产中运行 Kubernetes </a> 的文件中汇编了他的团队的经验教训。</p>
|
||
|
||
<!--
|
||
{{< case-studies/quote >}}
|
||
"The Kubernetes API allows us to run applications in a cloud provider-agnostic way, which gives us the freedom to revisit IaaS providers in the coming years... We expect the Kubernetes API to be the global standard for PaaS infrastructure and are excited about the continued journey."
|
||
{{< /case-studies/quote >}}
|
||
-->
|
||
{{< case-studies/quote >}}
|
||
“Kubernetes API 允许我们以与云提供商无关的方式运行应用程序,这使我们能够在未来几年中自由访问 IaaS 提供商...。我们期望 Kubernetes API 成为 PaaS 基础设施的全球标准,并对未来的继续旅程感到兴奋。”
|
||
{{< /case-studies/quote >}}
|
||
|
||
|
||
<!--
|
||
<p>In the end, Kubernetes made it possible for Zalando to introduce and maintain the new products the company envisioned to grow its platform. "<a href="https://www.zalon.de/">The fashion advice</a> product used Scala, and there were struggles to make this possible with our former infrastructure," says Jacobs. "It was a workaround, and that team needed more and more support from the platform team, just because they used different technologies. Now with Kubernetes, it's autonomous. Whatever the workload is, that team can just go their way, and Kubernetes prevents other bottlenecks."</p>
|
||
-->
|
||
<p>最后,Kubernetes 使 Zalando 能够引进和维护公司为发展其平台而设想的新产品。Jacobs 说:“时尚咨询产品使用 Scala,而我们以前的基础设施也难以实现这一点。”这是一个解决方法,该团队需要平台团队提供越来越多的支持,只是因为他们使用了不同的技术。现在有了 Kubernetes,它就自主了。无论工作负载是什么,该团队都可以走自己的路,而 Kubernetes 可以防止其他瓶颈。</p>
|
||
|
||
<!--
|
||
<p>Looking ahead, Jacobs sees Zalando's new infrastructure as a great enabler for other things the company has in the works, from its new logistics software, to a platform feature connecting brands, to products dreamed up by data scientists. "One vision is if you watch the next James Bond movie and see the suit he's wearing, you should be able to automatically order it, and have it delivered to you within an hour," says Jacobs. "It's about connecting the full fashion sphere. This is definitely not possible if you have a bottleneck with everyone running in the same data center and thus very restricted. You need infrastructure to scale each autonomous team's idea."</p>
|
||
-->
|
||
<p>展望未来,Jacobs 将 Zalando 的新基础设施视为公司在进行的其他工程中的巨大推动因素,从新的物流软件到连接品牌的平台功能,以及数据科学家梦寐以求的产品。Jacobs 说:“一个愿景是,如果你看下一部 James Bond 的电影,看看他穿的西装,你就应该能够自动订购,并在一小时内把它送到你身边。”“这是关于连接整个时尚领域。如果你遇到瓶颈,因为每个人都在同一个数据中心运行,因此限制很大,则这绝对是不可能的。需要基础设施来扩展每个自主团队的想法。”</p>
|
||
|
||
<!--
|
||
<p>For other companies considering this technology, Jacobs says he wouldn't necessarily advise doing it exactly the same way Zalando did. "It's okay to do so if you're ready to fail at some things," he says. "You need to set the right expectations. Not everything will work. Rewriting apps and this type of organizational change can be disruptive. The first product we moved was critical. There were a lot of dependencies, and it took longer than expected. Maybe we should have started with something less complicated, less business critical, just to get our toes wet."</p>
|
||
-->
|
||
<p>对于考虑这项技术的其他公司,Jacobs 说,他不一定建议像 Zalando 那样做。他表示:“如果你准备尝试失败,那么这样做是可以的。”“设定正确的期望是必须的。并不是一切都会起作用。重写应用和这种类型的组织更改可能会造成中断。我们移动的第一个产品至关重要。存在大量依赖关系,而且时间比预期长。也许我们应该从不那么复杂、不是业务关键的东西开始,只是为了开个好头。”</p>
|
||
|
||
<!--
|
||
<p>But once they got to the other side "it was clear for everyone that there's no big alternative," Jacobs adds. "The Kubernetes API allows us to run applications in a cloud provider-agnostic way, which gives us the freedom to revisit IaaS providers in the coming years. Zalando Technology benefits from migrating to Kubernetes as we are able to leverage our existing knowledge to create an engineering platform offering flexibility and speed to our engineers while significantly reducing the operational overhead. We expect the Kubernetes API to be the global standard for PaaS infrastructure and are excited about the continued journey."</p>
|
||
-->
|
||
<p>但是,一旦他们到了另一边,“每个人都很清楚,没有大的选择,” Jacobs 补充说。“Kubernetes API 允许我们以与云提供商无关的方式运行应用程序,这使我们能够在未来几年中自由访问 IaaS 提供商。Zalando 受益于迁移到 Kubernetes,因为我们能够利用现有知识创建工程平台,为我们的工程师提供灵活性和速度,同时显著降低运营开销。我们期望 Kubernetes API 成为 PaaS 基础设施的全球标准,并对未来的旅程感到兴奋。”</p>
|