智能工作用用程序:自动布线、K8s 扩展和无服务器功能——Enlin Xu,Turbonomic

将如何平衡无服务器功能与共存在 k8s 集群中的其他工作应用程序之间的资源?如何在达到资源限制的情况下扩展功能?您是应该扩展集群,还是将工作应用程序发送到另一个负载较小的集群?为了找到答案,我们一直在开展实验,通过各种平台(如 OpenWhisk,OpenFaaS 和 AWS Lambda)使用 Istio / Kong / Gloo 自动化智能工作负载路由和扩展。我们将分享我们所学到的知识,在确保性能的同时允许应用程序在任何云上运行。
展开查看详情

1.Smart Workloads: Automated Routing, Scaling of K8s and Serverless Functions Enlin Xu, Director of Advanced Engineering, Turbonomic

2.Agenda • Who are we • Challenges to deploy and operate applications in Cloud • Smart Workloads in Edge Computing • Demo • Key Takeaways

3.Who are we? • Founded in 2009 We’re Hiring! • Headquartered in Boston, MA, USA Join our engineering team as • 500+ employees we build for the end game. • $100m+ Revenue in 2017 Founded on the idea that software should manage IT resources, not people. Our software uses a Common Abstraction with Economic Principles to unleash automation! IDC Innovator: Multicloud Management, 2017

4.I want to run some code in cloud.. And? • Operational complexity • VM – Configure machines, storage, network, OS, etc. • Container – Configure application, scaling, etc. • Serverless – Memory configuration, where to run, etc. • Capacity management concerns • Cloud has infinity capacity – what about your budget? • Scalability – I want to have infinite scale!! • But only pay for what you really need

5.Serverless looks simple enough! Or is it?

6. Serverless Use Cases • An image upload to S3 triggers a Lambda to compute a thumbnail to post on Twitter • The same upload triggers another Lambda to analyze the image and create metadata such as place, persons, etc. • A code commit or PR merge triggers build jobs • An IoT sensor on a garbage can detects its fullness and triggers a function to put the garbage can on a pickup schedule • An ML scheduler kicks off a series of MapReduce worker functions • …

7. Complex Serverless Chains https://hackernoon.com/capture-and-forward-correlation-ids-through-different-lambda-event-sources-220c227c65f5?gi=48f5de1450fa

8.Challenges • Functions aren’t properly sized • When undersized high response time manifests • When oversized unnecessarily high cost accumulates • Solution: Rightsizing • Cross-region data transfer cost isn’t considered • Place Lambda in every region (stateless, no charge without using) • Solution: Re-route traffic to a different region to minimize overall transfer cost • A Kubernetes cluster is overloaded • Traditional solution: Scale out the cluster by adding more VMs • Alternative Solution: Route traffic out to a different cluster => Traffic Engineering

9.Smart Workloads with Edge Computing! • Easier to place, size (short-lived, smaller in size) • No need for continuous placement of function invocations • Traffic Engineering capable (stateless) • Multiple instances of the same function can be placed across clusters and regions • Client workload can be distributed over multiple function instances • Edge Computing • Moving intensive workloads from the Cloud out to the Edge of the network.

10. Demo: Route Control in Edge Computing Client A Client A Client Istio Pushing Policy to route the traffic Push routes Turbonomic Decision Making Engine to make real time Kong routing decision based on application API Gateway to forward to the correct endpoint performance AWS Knative Lambda Edge 1 Cloud

11.The Serverless Platform Public Cloud Kubernetes-based

12.Glue Layer

13.Service Routing Layer

14.Decision Engine Applications Capacity Databases Compute Public Cloud • AppDynamics • Cisco HyperFlex • Cisco UCS Manager Cisco • Cisco UCS Director Storage • Cisco Tetration • Cisco ACI • Cisco CloudCenter • …

15.Abstraction: The Supply Chain Market 2• Services entities shop for the best overall price for every commodity (resource) they need to perform. Service Entity App, Container, VM, Physical Machine, Fabric, etc. Buy Sell Commodity 3 CPU, Memory, Flow, IO, Within 1 hr. you 1• Everything in the data center is Storage, IOps, etc. see these abstracted into a supply chain relationships market. and metrics in Turbonomic

16.Analysis: Economic Supply, Demand, and Price Demand Supply Price after • Utilization (demand/supply) demand increase determines price. Delay • Workloads/service entities Price Current Price make scaling, placement, and capacity decisions based on all the resources they need. Utilization Quantity 0% 100%

17.Automation: Real-time Action Continuous Optimization Capacity Management Real-time actions drive continuous Quickly & accurately model what-if health: scenarios: Placement Workload growth Sizing Add/remove hardware Provisioning Cloud costs

18.Demo Time

19.Key Takeaways • Deploying in cloud is complicated, even serverless! • Workload needs to be Smart! • Resizable • Scalable • Routable • Take advantage of Edge Computing! • High bandwidth + Low latency • Decision-making is critical! • Performance • Cost Efficiency • Compliance

20.Thank you!! J