A telecom use case with Cloud Foundry deployment Krishna Kumar & Dhilip Kumar www.huawei.com HUAWEI TECHNOLOGIES CO., LTD.
Who are we? Huawei s PaaS team (Cloud Foundry) Krishna M Kumar Lead Architect Runs PaaS India Team Dhilip Kumar S Engineer Writes go programs for living HUAWEI TECHNOLOGIES CO., LTD. 2
Case Study Sell all the Huawei s consumer products from Huawei PaaS Huawei s telecom consumer products such as phone, tablets are sold in various countries There are special websites developed by Huawei to sell them Eg: http://www.vmall.my/ Understand their current deployment architecture Understand their spike and average behavior Understand Hardware utilization How to isolate among different installation? Propose a new solution based on PaaS HUAWEI TECHNOLOGIES CO., LTD. 3
VMall Introduction E-Com website Hosted in different continents on different data center China, Russia and Malasiya Based on the popular community version of the E-Commerce framework Magento Community version is Written in PHP, talks to MySQL and can be configured to use Redis as a Cache Huawei highly customized the open source community version to fit our needs Average Number of users logged into the website 800 to 1000 could spike to 17,000 during peak Average page loads of user from 600/min could spike to 20,000 / min November November No of Users Page Load / Min 18000 25000 16000 14000 20000 12000 10000 15000 8000 10000 6000 4000 5000 2000 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 HUAWEI TECHNOLOGIES CO., LTD. 4
HTTP Traffic HTTP Traffic VMall Typical Architecture 24 SSO 8 8 8 User 8 Order 8 12 12 12 Cache Hits Etc. HUAWEI TECHNOLOGIES CO., LTD. 5
VMall Current Issues Elastic scalability - VMs are created as needed manually. This is very inefficient and slow Multi-tenancy Separate VMs for handling this requirements Customization - Adapting to various geographical environment Separate setups are constructed for each area Provisioning Creating a new instance for dev or staging, etc. takes a quite lots of time. There is no automation built-in manual deployment Feature Rollout Key Features enhancement and redeployment to Test/Staging production is manual HUAWEI TECHNOLOGIES CO., LTD. 6
The Plan Get Magento Use Huawei PaaS Dev environment Use VM s from Huawei IAAS PaaS Port Magento to PaaS Install Magento IAAS Record user activity using Jmeter Record user activity using Jmeter Run script and get results Run script and get result Analyze the result against current issue map to customer s requirement Propse the new PaaS solution to the customer HUAWEI TECHNOLOGIES CO., LTD. 7
Magento Introduction Magento is an open-source content management system for e-commerce web sites Magento supports both Community and Enterprise edition #1 ecommerce Platform: IR Top 1000 More than 240,000 merchants worldwide 300+ solution and technology partner $25billion+ volume per year Architecture Few Magneto customers HUAWEI TECHNOLOGIES CO., LTD. 8
Magento Facts about Magento Not a 12 Factor Application High dependency with Database A simple home page refresh could issue 20+ Queries to the database -> F5 -> -> F5 -> Database has hardcoded redirection locations Database details are updated via configuration file and not environment variables HUAWEI TECHNOLOGIES CO., LTD. 9
Huawei PaaS Cloud Layout - Overview App Developer Service Provider PaaS Admin PaaS Portal / CLI Customer facing front end Portal. Rarely CLI is used. PaaS Management Service management Identity management Built-in Service & Out side service. Third party Interface. Cloudify VMs K8S Cloud Foundry V2 Primary PaaS solution. V2 DEA deployed. IaaS (Openstack, FusionSphere, VMWare) VM provisioned from here. HUAWEI TECHNOLOGIES CO., LTD. 10
The Setup POC Setup Magento Stand-alone using community edition Port Magento community edition in Huawei PaaS based on cloud foundry Stress test on both the environment using an automation tool Observe the results and hardware utilization Observe the challenges while porting the app Observe the benefits of moving such an app to PaaS JMETER JMETER 8 IaaS 8 gorouter PaaS 32 DEA CC HM9000 Warden Container running Magento HUAWEI TECHNOLOGIES CO., LTD. 11
DEMO HUAWEI TECHNOLOGIES CO., LTD. 12
How we moved the apps to Huawei PaaS Cloud New Design Considerations Use all the out-of-the-box service brokers available. Deploy the web application the best possible way in containers. Initiate separate VMs/Containers for each function in the architecture loosely coupled. Maintain the current Security Architecture layout Migration Considerations Maintain the legacy system as it is; for failover as well as for service validation. Backend service migration step-bystep; Must support all the features of the existing system. Migrate the applications cloud native way; don t just copy. [Adapt to 12-factor model as much as possible] Migrate apps for large scale adoption; not just for this particular use case. HUAWEI TECHNOLOGIES CO., LTD. 13
Service Brokers New Hosting Model - Architecture Front End Access Portals / Browser Nginx (serve static pages) Backend Systems UP OMS OFS WMS PTS Php FPM Container 1 Php FPM Container 2 Go Router Php FPM Container 3 Php FPM Container N VM / DEA / VM HUAWEI TECHNOLOGIES CO., LTD. 14
New Hosting Model Workflow Browser UI PaaS cli gorouter CC HM 9000 Router Controller PHP PHP PHP PHP PHP PHP DEA (Warden) MySQL Redis memcached Broker HUAWEI TECHNOLOGIES CO., LTD. 15
12 Factor Compatibility Factor Is Compatible Difficulty Codebase Dependency Configuration Backing Services Build, Release, Run Process Port Binding Concurrency Disposability Dev / Prod Parity Logs Admin Process HUAWEI TECHNOLOGIES CO., LTD. 16
Challenges. The top 10. Educate the customer about PaaS and its potential benefits Implementation of application stacks Build Packs, customization, etc. Convert to cloud native apps 12 factor app Router & Load Balancer configuration Multi-tenancy model implementation Automatic Scaling requirements based on load and scale down if necessary. Performance tuning to meet the expectations! Not a green field integration legacy systems & its complexities HUAWEI TECHNOLOGIES CO., LTD. 17
VMall Current Issues - Resolved Elastic scalability Easy to Achieve as App Servers are run inside a container. Multi-tenancy Easy to achieve as multiple Orgs and Spaces can be created. Customization - Adapting to various geographical environment Separate setups are constructed for each area Provisioning Its as easy as cf push and provision of the Application is done Feature Rollout Blue Green deployment technique can be used update the app with zero down time. HUAWEI TECHNOLOGIES CO., LTD. 18
Summary Better utilization of Hardware Easy multi-tenant hosting Moving an Enterprise application with legacy backend is very complex Cloud foundry helps a large extend to move web application tier Lots of manual jobs involved to move the system to PaaS Some kind of Cloud Foundry migration assistant tool will help a lot Finally, Lots of learning and great Satisfaction!!! HUAWEI TECHNOLOGIES CO., LTD. 19
Q&A Thank You! HUAWEI TECHNOLOGIES CO., LTD. 20