On the way to over 10M users… DOs and DON'Ts IGT – July 2011 Event.

Slides:



Advertisements
Similar presentations
Implementing Tableau Server in an Enterprise Environment
Advertisements

Amazon RDS (MySQL and Oracle) and SQL Azure Emil Tabakov Telerik Software Academy academy.telerik.com.
Solving Automation Reporting Problems with Dream Report Renee Sikes Applications Engineer Dream Report Brand Manager.
Adding scalability to legacy PHP web applications Overview Mario A. Valdez-Ramirez.
DEV392: Extending SharePoint Products And Technologies Through Web Parts And ASP.NET Clint Covington, Program Manager Data And Developer Services - Office.
ManageEngine TM Applications Manager 8 Monitoring Custom Applications.
From Entrepreneurial to Enterprise IT Grows Up Nate Baxley – ATLAS Rami Dass – ATLAS
Nikolay Tomitov Technical Trainer SoftAcad.bg.  What are Amazon Web services (AWS) ?  What’s cool when developing with AWS ?  Architecture of AWS 
Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare.
Understanding and Managing WebSphere V5
Google AppEngine. Google App Engine enables you to build and host web apps on the same systems that power Google applications. App Engine offers fast.
Running Your Database in the Cloud Eran Levin VP R&D - Xeround.
Web Application Architecture: multi-tier (2-tier, 3-tier) & mvc
How WebMD Maintains Operational Flexibility with NoSQL Rajeev Borborah, Sr. Director, Engineering Matt Wilson – Director, Production Engineering – Consumer.
22-Aug-15 | 1 |1 | Help! I need more servers! What do I do? Scaling a PHP application.
CONTINUOUS INTEGRATION, DELIVERY & DEPLOYMENT ONE CLICK DELIVERY.
Project Rickshaw SEARCH - FIND - GO. Project Rickshaw TEAM MEMBERS KEVIN AUGUSTINO – MATT FOX – DAVID MOORE SPONSORS KARASU TECHNOLOGIES - ERIK PAUL -
Opensource for Cloud Deployments – Risk – Reward – Reality
Introduction to the Enterprise Library. Sounds familiar? Writing a component to encapsulate data access Building a component that allows you to log errors.
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Lecture 8 – Platform as a Service. Introduction We have discussed the SPI model of Cloud Computing – IaaS – PaaS – SaaS.
ASP.NET INTRODUCTION INTO وزارة التربية و التعليم العالي كلية العلوم و التكنولوجيا قسم علوم الحاسوب و تكنولوجيا المعلومات اعداد الاستاذ: عبد الله محمد.
by Marc Comeau. About A Webmaster Developing a website goes far beyond understanding underlying technologies Determine your requirements.
What’s new in Stack 3.2 Michael Youngstrom. Disclaimer This IS a presentation – So sit back and relax Please ask questions.
Framework Universal & Infinite Software Solution.
AUTOBUILD Build and Deployment Automation Solution.
London April 2005 London April 2005 Creating Eyeblaster Ads The Rich Media Platform The Rich Media Platform Eyeblaster.
CakePHP is an open source web development framework. It follows Model-View- Controller and is developed using PHP. IT is the basic for user to create.
Middleware for FIs Apeego House 4B, Tardeo Rd. Mumbai Tel: Fax:
What’s new in Kentico CMS 5.0 Michal Neuwirth Product Manager Kentico Software.
Website s Azure Websites is an enterprise class cloud solution for developing, testing and running web apps. Azure Websites allows you to focus on what.
WEP Presentation for non-IT Steps and roles in software development 2. Skills developed in 1 st year 3. What can do a student in 1 st internship.
® IBM Software Group © 2007 IBM Corporation Best Practices for Session Management
1 PUPPET AND DSC. INTRODUCTION AND USAGE IN CONTINUOUS DELIVERY PROCESS. VIKTAR VEDMICH PAVEL PESETSKIY AUGUST 1, 2015.
Aviran Mordo Head of linkedin.com/in/aviran aviransplace.com Scaling with Microservices Architecture and Multi-cloud platforms.
ASP.NET in Definition: 1.ASP.NET is a web application framework developed and marketed by Microsoft to allow programmers to build dynamic web sites,
VMware vSphere Configuration and Management v6
Katari Globant 2008 (update to 2010). Katari  Katari is a framework to use as a starting point to develop new web applications.  Incorporates architecture,
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
ICM – API Server & Forms Gary Ratcliffe.
SPI NIGHTLIES Alex Hodgkins. SPI nightlies  Build and test various software projects each night  Provide a nightlies summary page that displays all.
Microsoft Azure and DataStax: Start Anywhere and Scale to Any Size in the Cloud, On- Premises, or Both with a Leading Distributed Database MICROSOFT AZURE.
Breaking Up Is Hard To Do From Monolith to Microservices.
Cloud Computing from a Developer’s Perspective Shlomo Swidler CTO & Founder mydrifts.com 25 January 2009.
The Next Level Of Agile: DevOps and CD אוקטובר 2015.
Copyright © New Signature Who we are: Focused on consistently delivering great customer experiences. What we do: We help you transform your business.
 Cloud Computing technology basics Platform Evolution Advantages  Microsoft Windows Azure technology basics Windows Azure – A Lap around the platform.
Improve the Performance, Scalability, and Reliability of Applications in the Cloud with jetNEXUS Load Balancer for Microsoft Azure MICROSOFT AZURE ISV.
Cofax Scalability Document Version Scaling Cofax in General The scalability of Cofax is directly related to the system software, hardware and network.
Amazon Web Services. Amazon Web Services (AWS) - robust, scalable and affordable infrastructure for cloud computing. This session is about:
DreamFactory for Microsoft Azure Is an Open Source REST API Platform That Enables Mobilization of Data in Minutes across Frameworks and Storage Methods.
Presented by Alexey Vedishchev Developing Web-applications with Grails framework American University of Nigeria, 2016 Intro To MVC Architecture.
The Holmes Platform and Applications
Agenda:- DevOps Tools Chef Jenkins Puppet Apache Ant Apache Maven Logstash Docker New Relic Gradle Git.
Scalable Web Apps Target this solution to brand leaders responsible for customer engagement and roll-out of global marketing campaigns. Implement scenarios.
Netscape Application Server
Google App Engine Mandeep Singh (37926)
Docker Birthday #3.
Platform as a Service.
Scalable Web Apps Target this solution to brand leaders responsible for customer engagement and roll-out of global marketing campaigns. Implement scenarios.
Built on the Powerful Microsoft Azure Platform, Lievestro Delivers Care Information, Capacity Management Solutions to Hospitals, Medical Field MICROSOFT.
Arrested by the CAP Handling Data in Distributed Systems
Simplified Development Toolkit
Dell Data Protection | Rapid Recovery: Simple, Quick, Configurable, and Affordable Cloud-Based Backup, Retention, and Archiving Powered by Microsoft Azure.
Lecture 1: Multi-tier Architecture Overview
Google App Engine Ying Zou 01/24/2016.
AWS Cloud Computing Masaki.
Building Serverless Enterprise Applications
Mark Quirk Head of Technology Developer & Platform Group
Containers and DevOps.
Presentation transcript:

on the way to over 10M users… DOs and DON'Ts IGT – July 2011 Event

Wix Initial Architecture Wix Sites WixML Pages User Authentication Users Media Public Media Template Galleries Public Sites Serving Sites Editing API User Authentication User Media upload, searches Public Media upload, management, searches Template Galleries management Server Database

Wix Initial Architecture Tomcat, Hibernate, Custom web framework – Everything generated from HBM files – Built for fast development – Statefull login (tomcat session), EHCache, File uploads – Not considering performance, scalability, fast feature rollout, testing – It reflected the fact that we didn’t really know what is our business – Yoav A. - “it is great for a first stage start-up, but you will have to replace it within 2 years” – Nadav A, after two years - “you were right, however, you failed to mention how hard it’s gonna be”

Wix Initial Architecture What we have learned Don’t worry about ‘building it right from the start’ – you won’t You are going to replace stuff you are building in the initial stages of a startup or any project Be ready to do it Get it up to customers as fast as you can. Get feedback. Evolve. Our mistake was not planning for gradual re-write Build for gradual re-write as you learn the problems and find the right solutions

Distributed Cache Next we added EHCache as Hibernate 2 nd -level cache Why? – Cause it is in the design How was it? – Black Box cache – How do we know what is the state of our system? – How to invalidate the cache? – When to invalidate it? – How does operations manage the cache? Did we really need it? – No We eventually dropped it

Distributed Cache What we have learned You don’t need a Cache Really, you don’t Cache is not part of an architecture. It is a means to make something more efficient Architect while ignoring the caching. Introduce caching only as needed to solve real performance problems. When introducing a cache, think about – cache management – how do you know what is in the cache? How do you find invalid data in the cache? – Invalidation – who invalidates the cache? When? Why? – Cache Reset – can your architecture stand a cache restart?

Two years passed We learned what our business is – building websites We started selling premium websites

Two years passed Our architecture evolved – We added a separate Billing segment – We moved static file storage and serving to a separate instance But we started seeing problems – Updates to our server imposed complete wix downtime – Our static storage reached 500 GByte of small files, the limit of Bash scripts – The server codebase became large and entangled. Feature rollout became harder over time, requiring longer and longer manual regression Strange full-table scans queries generated by Hibernate, which we still have no idea what code is responsible for… – Statefull user sessions required a lot of memory and a statefull load balancer Server (Tomcat) Server (Tomcat) DB statics (Lighttpd) statics (Lighttpd) Media storage Billing (Tomcat) Billing (Tomcat) Billing DB

Editor & Public Segments The Challenge - Updates to our Server imposed downtime for our customer’s websites – Any Server or Database update has the potential of bringing down all Wix sites – Is a symptom of a larger issue The Server served two different concerns – Wix Users editing websites – Viewing Wix Sites, the sites created by the Wix editor The two concerns require a different SLA – Wix Sites should never ever have a downtime! – Wix Sites should work as fast as possible, always! – However, an editing system does not require this level of SLA. The two concerns evolve independently – Releases of Editing feature should have no impact on existing Wix sites operations!

Editor & Public Segments Our Solution – Split the Server into two Segments – Public and Editor The Public segment targets serving websites for Wix Users – Has mostly read-only usage pattern – only updated on when a site is published – Simple publishing system – Simple means it is easier to have higher SLA – Simple and read-only means it is easier to make DRP – Built using Spring MVC 2.5 and JDBC (without Hibernate) – MySQL used as NoSQL – single large table with XML text fields The Editor segment – Exposes the Wix Editing APIs, as well as user account and galleries management APIs. – Has different release schedule compared to the Public segment Public (Tomcat) Public (Tomcat) Public DB Public DB Editor (Tomcat) Editor (Tomcat) Editor DB Editor DB

Editor & Public Segments What we have learned Architecture is inspired by aspects such as – SLA – Release Cycles – deployment flexibility Separate Segments for discrete concerns – Editing (Editor Segment) – Publishing (Public Segment) modularity – in terms of breaking the architecture to services / modules / sub-systems (or any other name) – Enabler for gradual re-write – Enabler for continues delivery – Simplifies QA, Operations & Release Cycles Public (Tomcat) Public (Tomcat) Public DB Public DB Editor (Tomcat) Editor (Tomcat) Editor DB Editor DB

Editor & Public Segments What we have learned MySQL is a damn good NoSQL engine – Our public DB is (mainly) one table with 10M entries – Queries are by primary key – Updates are by primary key – Instead of relations, we use text/xml columns Immutable Data – Architect your data to be immutable MySql sequential keys cause problems – Locks on key generation – Require a single instance to generate keys We use GUID keys – Can be generated by any client – No locks in key value generation – Enabler for Master-Master replication Public (Tomcat) Public (Tomcat) Public DB Public DB Editor (Tomcat) Editor (Tomcat) Editor DB Editor DB

Authentication Segment The Challenge – Statefull user sessions – Makes it harder to separate software to different segments Requires shared library or single sign-on – Requires statefull load balancer – Takes more memory Our solution – Dedicated authentication segment – authentication is a specific concern – Cookie based login – solves all the above problems – Implement stronger security solution only where really required What we have learned Do not use statefull sessions – they don’t scale (easily) Use cookie based login – this is the standard on the web today

The Challenge – Our static storage reached over 500 GByte of small files – The “upload to app server, copy to static server, serve by file server” pattern proved inefficient, slow and error prone – Disk IO became slow and inefficient as the number of files increased – We needed a solution we can grow with – HTTP connections number of files – We needed control over caching and Http headers Our Solution – Prospero – You’ve heard about it in a previous presentation

What we have learned It was hard to make Prospero work right – But it was the right choice for us Media files caching headers are critical – Max-age, ETag, if-modified-since, etc. – Think how to tune those parameters for media files, as per your specific needs We tried using Amazon S3 as secondary storage – However, they proved unreliable The S3 service had connection reliability issues S3 have “lost” a 200M files, 30 Tbyte volume We found that using a CDN in front of Prospero is very affective

CDN What we have learned Use a CDN! CDN acts as a great connection manager – We have CDN hit ratio’s of over 99.9% Use the “Cache Killer” pattern – – Makes flushing files from the CDN redundant – Enabler for longer caching periods There are many vendors – We started with 1 CDN vendor – We are now “playing” with multiple CDN vendors – Different CDN vendors have advantages at different geo Tune HTTP Headers per CDN Vendor – CDN Vendors interpret HTTP heads differently

Wix-Framework / TDD / DevOps The Challenge – The server codebase became large and entangled – Feature rollout became harder over time, requiring longer and longer manual regression The Solution – The Wix Framework + TDD / CI / CD / DevOps TDD – Developer responsible for all automated tests – With QA Developers CI / CD – automate build & deployment – Solve the build / test / deployment / rollback issues first – Get the project to production with minimal functionality DevOps - Developer is responsible from Product to 10,000 active users

Wix-Framework The Wix Framework – Java, Spring, Jetty, MySQL, MongoDB – Spring MVC based Adjustments for Flash – Flash imposes some restrictions on HTTP which require special handling DevOps support – Built-in support for monitoring dashboard, configuration, usage tracking, profiling and Self-Test in every app server – Automated Deployment – using Chef and SouceChef TDD Support – Unit-Testing helpers – Multi-browser Javascript Unit-Testing support, integrated with IDE – Integration Testing framework, allows running the same tests in embedded mode (for developer) and deployed in production like env – Embedded MySQL & Embedded MongoDB

TDD / DevOps Our development process – Developer writes code and Unit-Tests – Developer and QA Developer write integration tests (IT) Build on developer machine On check-in Mark RC Deploy to QA env Mark GA Deploy to production Compile Unit Tests Embedded ITs Compile Unit Tests Self Tests Deploy – IT Env Run ITs RC QA Self Tests Deploy – QA Env Monitor GA Self Tests Deploy – Production Monitor

Wix-Framework / TDD / DevOps What we have learned TDD / CI / CD / DevOps works It enables us to release frequently – We release 2-3 times a day – With higher confidence in release quality – With reduced risk It takes time and effort – Requires management commitment – Transforms the way R&D, Product and operations work – Requires investment in supporting tools – the Wix Framework – Infrastructure – Build Server, Artifactory, Maven (+Plugins), Chef, SourceChef, Testing environments (virtual boxes), Server Dashboard, New Relic. It is worth the effort! – A Wix developer – “never again shell I work without automated testing”

Some of our Tools