SlideShare uma empresa Scribd logo
1 de 22
DOs and DON'Ts  on the way to over 10M users… IGT –  Event July 2011
Wix Initial Architecture Server Public Sites Serving Sites Editing API User Authentication User Media upload, searches Public Media upload,   management, searches Template Galleries   management Database Wix Sites WixML Pages User Authentication Users Media Public Media Template Galleries
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 2nd-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 BillingDB Billing (Tomcat) Server (Tomcat) DB statics (Lighttpd) Media storage
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  DB Editor (Tomcat) 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  DB Editor (Tomcat) Editor  DB
Editor & Public Segments What we have learned MySQL is a damn good NoSQLengine 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  DB Editor (Tomcat) 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 http://static.wix.com/client/css/viewer.css?v=327 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 Productto 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 Run ITs Compile Unit Tests Self Tests Deploy – IT Env 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
DOs and DONTs on the way to 10M users

Mais conteúdo relacionado

Mais procurados

Scaling up to 30M users - The Wix Story
Scaling up to 30M users - The Wix StoryScaling up to 30M users - The Wix Story
Scaling up to 30M users - The Wix StoryAviran Mordo
 
Scaling wix.com to 100 million users
Scaling wix.com to 100 million users Scaling wix.com to 100 million users
Scaling wix.com to 100 million users Aviran Mordo
 
ECMDay2015 - Kent Agerlund – Configuration Manager 2012 – A Site Review
ECMDay2015 - Kent Agerlund – Configuration Manager 2012 – A Site ReviewECMDay2015 - Kent Agerlund – Configuration Manager 2012 – A Site Review
ECMDay2015 - Kent Agerlund – Configuration Manager 2012 – A Site ReviewKenny Buntinx
 
Java dans Windows Azure Cloud Services, big data avec hd insight et les nouve...
Java dans Windows Azure Cloud Services, big data avec hd insight et les nouve...Java dans Windows Azure Cloud Services, big data avec hd insight et les nouve...
Java dans Windows Azure Cloud Services, big data avec hd insight et les nouve...Microsoft
 
Varrow Q4 Lunch & Learn Presentation - Virtualizing Business Critical Applica...
Varrow Q4 Lunch & Learn Presentation - Virtualizing Business Critical Applica...Varrow Q4 Lunch & Learn Presentation - Virtualizing Business Critical Applica...
Varrow Q4 Lunch & Learn Presentation - Virtualizing Business Critical Applica...Andrew Miller
 
Shopzilla - Performance By Design
Shopzilla - Performance By DesignShopzilla - Performance By Design
Shopzilla - Performance By DesignTim Morrow
 
Presentation v mware v-cloud director
Presentation   v mware v-cloud directorPresentation   v mware v-cloud director
Presentation v mware v-cloud directorsolarisyourep
 
BizSpark Startup Night Windows Azure March 29, 2011
BizSpark Startup Night Windows Azure March 29, 2011BizSpark Startup Night Windows Azure March 29, 2011
BizSpark Startup Night Windows Azure March 29, 2011Spiffy
 
Deploy, Scale and Manage your Microsoft Investments with AWS
Deploy, Scale and Manage your Microsoft Investments with AWSDeploy, Scale and Manage your Microsoft Investments with AWS
Deploy, Scale and Manage your Microsoft Investments with AWSAmazon Web Services
 
ExaGrid and Symantec NetBackup: Optimizing Data Protection Webinar
ExaGrid  and Symantec NetBackup: Optimizing Data Protection WebinarExaGrid  and Symantec NetBackup: Optimizing Data Protection Webinar
ExaGrid and Symantec NetBackup: Optimizing Data Protection WebinarBill Hobbib
 
Presentation desarrollos cloud con oracle virtualization
Presentation   desarrollos cloud con oracle virtualizationPresentation   desarrollos cloud con oracle virtualization
Presentation desarrollos cloud con oracle virtualizationxKinAnx
 
Presentation v mware v-cloud director overview
Presentation   v mware v-cloud director overviewPresentation   v mware v-cloud director overview
Presentation v mware v-cloud director overviewsolarisyourep
 
Stay productive_while_slicing_up_the_monolith
Stay productive_while_slicing_up_the_monolithStay productive_while_slicing_up_the_monolith
Stay productive_while_slicing_up_the_monolithMarkus Eisele
 
Migrer vos bases Oracle vers du SQL, le tout dans Azure !
Migrer vos bases Oracle vers du SQL, le tout dans Azure !Migrer vos bases Oracle vers du SQL, le tout dans Azure !
Migrer vos bases Oracle vers du SQL, le tout dans Azure !Microsoft Technet France
 
Tech Ed North America 2014 - Java on Azure
Tech Ed North America 2014 - Java on AzureTech Ed North America 2014 - Java on Azure
Tech Ed North America 2014 - Java on AzureBrian Benz
 
Tech ED 2014 Running Oracle Databases and Application Servers on Azurev1
Tech ED 2014   Running Oracle Databases and Application Servers on Azurev1Tech ED 2014   Running Oracle Databases and Application Servers on Azurev1
Tech ED 2014 Running Oracle Databases and Application Servers on Azurev1Brian Benz
 
Big App Workloads on Microsoft Azure - TechEd Europe 2014
Big App Workloads on Microsoft Azure - TechEd Europe 2014Big App Workloads on Microsoft Azure - TechEd Europe 2014
Big App Workloads on Microsoft Azure - TechEd Europe 2014Brian Benz
 

Mais procurados (20)

Scaling up to 30M users - The Wix Story
Scaling up to 30M users - The Wix StoryScaling up to 30M users - The Wix Story
Scaling up to 30M users - The Wix Story
 
Scaling wix.com to 100 million users
Scaling wix.com to 100 million users Scaling wix.com to 100 million users
Scaling wix.com to 100 million users
 
ECMDay2015 - Kent Agerlund – Configuration Manager 2012 – A Site Review
ECMDay2015 - Kent Agerlund – Configuration Manager 2012 – A Site ReviewECMDay2015 - Kent Agerlund – Configuration Manager 2012 – A Site Review
ECMDay2015 - Kent Agerlund – Configuration Manager 2012 – A Site Review
 
Java dans Windows Azure Cloud Services, big data avec hd insight et les nouve...
Java dans Windows Azure Cloud Services, big data avec hd insight et les nouve...Java dans Windows Azure Cloud Services, big data avec hd insight et les nouve...
Java dans Windows Azure Cloud Services, big data avec hd insight et les nouve...
 
Varrow Q4 Lunch & Learn Presentation - Virtualizing Business Critical Applica...
Varrow Q4 Lunch & Learn Presentation - Virtualizing Business Critical Applica...Varrow Q4 Lunch & Learn Presentation - Virtualizing Business Critical Applica...
Varrow Q4 Lunch & Learn Presentation - Virtualizing Business Critical Applica...
 
Azure appfabric caching intro and tips
Azure appfabric caching intro and tipsAzure appfabric caching intro and tips
Azure appfabric caching intro and tips
 
Shopzilla - Performance By Design
Shopzilla - Performance By DesignShopzilla - Performance By Design
Shopzilla - Performance By Design
 
Presentation v mware v-cloud director
Presentation   v mware v-cloud directorPresentation   v mware v-cloud director
Presentation v mware v-cloud director
 
BizSpark Startup Night Windows Azure March 29, 2011
BizSpark Startup Night Windows Azure March 29, 2011BizSpark Startup Night Windows Azure March 29, 2011
BizSpark Startup Night Windows Azure March 29, 2011
 
Deploy, Scale and Manage your Microsoft Investments with AWS
Deploy, Scale and Manage your Microsoft Investments with AWSDeploy, Scale and Manage your Microsoft Investments with AWS
Deploy, Scale and Manage your Microsoft Investments with AWS
 
SOA to Microservices
SOA to MicroservicesSOA to Microservices
SOA to Microservices
 
ExaGrid and Symantec NetBackup: Optimizing Data Protection Webinar
ExaGrid  and Symantec NetBackup: Optimizing Data Protection WebinarExaGrid  and Symantec NetBackup: Optimizing Data Protection Webinar
ExaGrid and Symantec NetBackup: Optimizing Data Protection Webinar
 
Presentation desarrollos cloud con oracle virtualization
Presentation   desarrollos cloud con oracle virtualizationPresentation   desarrollos cloud con oracle virtualization
Presentation desarrollos cloud con oracle virtualization
 
Presentation v mware v-cloud director overview
Presentation   v mware v-cloud director overviewPresentation   v mware v-cloud director overview
Presentation v mware v-cloud director overview
 
Stay productive_while_slicing_up_the_monolith
Stay productive_while_slicing_up_the_monolithStay productive_while_slicing_up_the_monolith
Stay productive_while_slicing_up_the_monolith
 
Migrer vos bases Oracle vers du SQL, le tout dans Azure !
Migrer vos bases Oracle vers du SQL, le tout dans Azure !Migrer vos bases Oracle vers du SQL, le tout dans Azure !
Migrer vos bases Oracle vers du SQL, le tout dans Azure !
 
Tech Ed North America 2014 - Java on Azure
Tech Ed North America 2014 - Java on AzureTech Ed North America 2014 - Java on Azure
Tech Ed North America 2014 - Java on Azure
 
vCloud Architecture BrownBag
vCloud Architecture BrownBagvCloud Architecture BrownBag
vCloud Architecture BrownBag
 
Tech ED 2014 Running Oracle Databases and Application Servers on Azurev1
Tech ED 2014   Running Oracle Databases and Application Servers on Azurev1Tech ED 2014   Running Oracle Databases and Application Servers on Azurev1
Tech ED 2014 Running Oracle Databases and Application Servers on Azurev1
 
Big App Workloads on Microsoft Azure - TechEd Europe 2014
Big App Workloads on Microsoft Azure - TechEd Europe 2014Big App Workloads on Microsoft Azure - TechEd Europe 2014
Big App Workloads on Microsoft Azure - TechEd Europe 2014
 

Destaque

Wix 10M Users Event - Prospero Media Storage
Wix 10M Users Event - Prospero Media StorageWix 10M Users Event - Prospero Media Storage
Wix 10M Users Event - Prospero Media StorageYoav Avrahami
 
Antoloxía de Lois Pereiro por Mariña Amo
Antoloxía de Lois Pereiro por Mariña AmoAntoloxía de Lois Pereiro por Mariña Amo
Antoloxía de Lois Pereiro por Mariña Amoporviso
 
Pintura figurativa e abstrata
Pintura figurativa e abstrataPintura figurativa e abstrata
Pintura figurativa e abstratamanasantos
 
Playing with Java Classes and Bytecode
Playing with Java Classes and BytecodePlaying with Java Classes and Bytecode
Playing with Java Classes and BytecodeYoav Avrahami
 
Tortenet valosagshow
Tortenet valosagshowTortenet valosagshow
Tortenet valosagshowAdelina Buna
 
Tortenet valosagshow
Tortenet valosagshowTortenet valosagshow
Tortenet valosagshowAdelina Buna
 
Software Architecture
Software ArchitectureSoftware Architecture
Software ArchitectureYoav Avrahami
 
Continuous Delivery at Wix
Continuous Delivery at WixContinuous Delivery at Wix
Continuous Delivery at WixYoav Avrahami
 
Scala design pattern
Scala design patternScala design pattern
Scala design patternKenji Yoshida
 
Día do libro1
Día do libro1Día do libro1
Día do libro1porviso
 
DevOps is not a Culture. It is about responsibility
DevOps is not a Culture. It is about responsibilityDevOps is not a Culture. It is about responsibility
DevOps is not a Culture. It is about responsibilityYoav Avrahami
 

Destaque (15)

Wix 10M Users Event - Prospero Media Storage
Wix 10M Users Event - Prospero Media StorageWix 10M Users Event - Prospero Media Storage
Wix 10M Users Event - Prospero Media Storage
 
Antoloxía de Lois Pereiro por Mariña Amo
Antoloxía de Lois Pereiro por Mariña AmoAntoloxía de Lois Pereiro por Mariña Amo
Antoloxía de Lois Pereiro por Mariña Amo
 
Pintura figurativa e abstrata
Pintura figurativa e abstrataPintura figurativa e abstrata
Pintura figurativa e abstrata
 
Playing with Java Classes and Bytecode
Playing with Java Classes and BytecodePlaying with Java Classes and Bytecode
Playing with Java Classes and Bytecode
 
Tortenet valosagshow
Tortenet valosagshowTortenet valosagshow
Tortenet valosagshow
 
Valosag mufajok
Valosag mufajokValosag mufajok
Valosag mufajok
 
Tortenet valosagshow
Tortenet valosagshowTortenet valosagshow
Tortenet valosagshow
 
Lystrup slides
Lystrup slidesLystrup slides
Lystrup slides
 
Software Architecture
Software ArchitectureSoftware Architecture
Software Architecture
 
Jvm memory model
Jvm memory modelJvm memory model
Jvm memory model
 
Continuous Delivery at Wix
Continuous Delivery at WixContinuous Delivery at Wix
Continuous Delivery at Wix
 
Scala design pattern
Scala design patternScala design pattern
Scala design pattern
 
Día do libro1
Día do libro1Día do libro1
Día do libro1
 
DevOps is not a Culture. It is about responsibility
DevOps is not a Culture. It is about responsibilityDevOps is not a Culture. It is about responsibility
DevOps is not a Culture. It is about responsibility
 
scala-kaigi1-sbt
scala-kaigi1-sbtscala-kaigi1-sbt
scala-kaigi1-sbt
 

Semelhante a DOs and DONTs on the way to 10M users

스타트업과 개발자를 위한 AWS 클라우드 태권 세미나
스타트업과 개발자를 위한 AWS 클라우드 태권 세미나스타트업과 개발자를 위한 AWS 클라우드 태권 세미나
스타트업과 개발자를 위한 AWS 클라우드 태권 세미나Amazon Web Services Korea
 
Architecture: When, how, and if to Adopt Microservices
Architecture: When, how, and if to Adopt MicroservicesArchitecture: When, how, and if to Adopt Microservices
Architecture: When, how, and if to Adopt MicroservicesAmazon Web Services
 
AWS Customer Presentation - Conde Nast
AWS Customer Presentation - Conde NastAWS Customer Presentation - Conde Nast
AWS Customer Presentation - Conde NastAmazon Web Services
 
RTC/CLM 5.0 Adoption Paths: Deploying in 16 Steps
 RTC/CLM 5.0 Adoption Paths: Deploying in 16 Steps RTC/CLM 5.0 Adoption Paths: Deploying in 16 Steps
RTC/CLM 5.0 Adoption Paths: Deploying in 16 StepsStéphane Leroy
 
Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010
Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010
Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010Bhupesh Bansal
 
Hadoop and Voldemort @ LinkedIn
Hadoop and Voldemort @ LinkedInHadoop and Voldemort @ LinkedIn
Hadoop and Voldemort @ LinkedInHadoop User Group
 
AAI-2075 Evolving an IBM WebSphere Topology to Manage a Changing Workloa
AAI-2075 Evolving an IBM WebSphere Topology to Manage a Changing WorkloaAAI-2075 Evolving an IBM WebSphere Topology to Manage a Changing Workloa
AAI-2075 Evolving an IBM WebSphere Topology to Manage a Changing WorkloaWASdev Community
 
10 Pro Tips for scaling your startup from 0-10M users
10 Pro Tips for scaling your startup from 0-10M users10 Pro Tips for scaling your startup from 0-10M users
10 Pro Tips for scaling your startup from 0-10M usersAmazon Web Services
 
Advantages of cPanel-based LiteSpeed Hosting
Advantages of cPanel-based LiteSpeed HostingAdvantages of cPanel-based LiteSpeed Hosting
Advantages of cPanel-based LiteSpeed HostingLisa Clarke
 
Was l iberty for java batch and jsr352
Was l iberty for java batch and jsr352Was l iberty for java batch and jsr352
Was l iberty for java batch and jsr352sflynn073
 
What's new in Portal and WCM 8.5
What's new in Portal and WCM 8.5What's new in Portal and WCM 8.5
What's new in Portal and WCM 8.5Vinayak Tavargeri
 
Class 7: Introduction to web technology entrepreneurship
Class 7: Introduction to web technology entrepreneurshipClass 7: Introduction to web technology entrepreneurship
Class 7: Introduction to web technology entrepreneurshipallanchao
 
ServerTemplate Deep Dive
ServerTemplate Deep DiveServerTemplate Deep Dive
ServerTemplate Deep DiveRightScale
 
Real-time Code Sharing Service for one-to-many coding classes
Real-time Code Sharing Service for one-to-many coding classesReal-time Code Sharing Service for one-to-many coding classes
Real-time Code Sharing Service for one-to-many coding classesa2tt
 
Sysco Oracle Tour 2016 - What's new in FMW 12.2.1?
Sysco Oracle Tour 2016 - What's new in FMW 12.2.1?Sysco Oracle Tour 2016 - What's new in FMW 12.2.1?
Sysco Oracle Tour 2016 - What's new in FMW 12.2.1?Jon Petter Hjulstad
 
Create Agile, Automated and Predictable IT Infrastructure in the Cloud
Create Agile, Automated and Predictable IT Infrastructure in the CloudCreate Agile, Automated and Predictable IT Infrastructure in the Cloud
Create Agile, Automated and Predictable IT Infrastructure in the CloudRightScale
 
DevOps at Amazon: A Look at Our Tools and Processes
DevOps at Amazon: A Look at Our Tools and ProcessesDevOps at Amazon: A Look at Our Tools and Processes
DevOps at Amazon: A Look at Our Tools and ProcessesAmazon Web Services
 
20211028 ADDO Adapting to Covid with Serverless Craeg Strong Ariel Partners
20211028 ADDO Adapting to Covid with Serverless Craeg Strong Ariel Partners20211028 ADDO Adapting to Covid with Serverless Craeg Strong Ariel Partners
20211028 ADDO Adapting to Covid with Serverless Craeg Strong Ariel PartnersCraeg Strong
 

Semelhante a DOs and DONTs on the way to 10M users (20)

스타트업과 개발자를 위한 AWS 클라우드 태권 세미나
스타트업과 개발자를 위한 AWS 클라우드 태권 세미나스타트업과 개발자를 위한 AWS 클라우드 태권 세미나
스타트업과 개발자를 위한 AWS 클라우드 태권 세미나
 
Architecture: When, how, and if to Adopt Microservices
Architecture: When, how, and if to Adopt MicroservicesArchitecture: When, how, and if to Adopt Microservices
Architecture: When, how, and if to Adopt Microservices
 
AWS Customer Presentation - Conde Nast
AWS Customer Presentation - Conde NastAWS Customer Presentation - Conde Nast
AWS Customer Presentation - Conde Nast
 
RTC/CLM 5.0 Adoption Paths: Deploying in 16 Steps
 RTC/CLM 5.0 Adoption Paths: Deploying in 16 Steps RTC/CLM 5.0 Adoption Paths: Deploying in 16 Steps
RTC/CLM 5.0 Adoption Paths: Deploying in 16 Steps
 
Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010
Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010
Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010
 
Hadoop and Voldemort @ LinkedIn
Hadoop and Voldemort @ LinkedInHadoop and Voldemort @ LinkedIn
Hadoop and Voldemort @ LinkedIn
 
AAI-2075 Evolving an IBM WebSphere Topology to Manage a Changing Workloa
AAI-2075 Evolving an IBM WebSphere Topology to Manage a Changing WorkloaAAI-2075 Evolving an IBM WebSphere Topology to Manage a Changing Workloa
AAI-2075 Evolving an IBM WebSphere Topology to Manage a Changing Workloa
 
10 Pro Tips for scaling your startup from 0-10M users
10 Pro Tips for scaling your startup from 0-10M users10 Pro Tips for scaling your startup from 0-10M users
10 Pro Tips for scaling your startup from 0-10M users
 
Advantages of cPanel-based LiteSpeed Hosting
Advantages of cPanel-based LiteSpeed HostingAdvantages of cPanel-based LiteSpeed Hosting
Advantages of cPanel-based LiteSpeed Hosting
 
Was l iberty for java batch and jsr352
Was l iberty for java batch and jsr352Was l iberty for java batch and jsr352
Was l iberty for java batch and jsr352
 
What's new in Portal and WCM 8.5
What's new in Portal and WCM 8.5What's new in Portal and WCM 8.5
What's new in Portal and WCM 8.5
 
Class 7: Introduction to web technology entrepreneurship
Class 7: Introduction to web technology entrepreneurshipClass 7: Introduction to web technology entrepreneurship
Class 7: Introduction to web technology entrepreneurship
 
ServerTemplate Deep Dive
ServerTemplate Deep DiveServerTemplate Deep Dive
ServerTemplate Deep Dive
 
Real-time Code Sharing Service for one-to-many coding classes
Real-time Code Sharing Service for one-to-many coding classesReal-time Code Sharing Service for one-to-many coding classes
Real-time Code Sharing Service for one-to-many coding classes
 
New cms final
New cms finalNew cms final
New cms final
 
Introduction to Mysql
Introduction to MysqlIntroduction to Mysql
Introduction to Mysql
 
Sysco Oracle Tour 2016 - What's new in FMW 12.2.1?
Sysco Oracle Tour 2016 - What's new in FMW 12.2.1?Sysco Oracle Tour 2016 - What's new in FMW 12.2.1?
Sysco Oracle Tour 2016 - What's new in FMW 12.2.1?
 
Create Agile, Automated and Predictable IT Infrastructure in the Cloud
Create Agile, Automated and Predictable IT Infrastructure in the CloudCreate Agile, Automated and Predictable IT Infrastructure in the Cloud
Create Agile, Automated and Predictable IT Infrastructure in the Cloud
 
DevOps at Amazon: A Look at Our Tools and Processes
DevOps at Amazon: A Look at Our Tools and ProcessesDevOps at Amazon: A Look at Our Tools and Processes
DevOps at Amazon: A Look at Our Tools and Processes
 
20211028 ADDO Adapting to Covid with Serverless Craeg Strong Ariel Partners
20211028 ADDO Adapting to Covid with Serverless Craeg Strong Ariel Partners20211028 ADDO Adapting to Covid with Serverless Craeg Strong Ariel Partners
20211028 ADDO Adapting to Covid with Serverless Craeg Strong Ariel Partners
 

Último

Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 

Último (20)

Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 

DOs and DONTs on the way to 10M users

  • 1. DOs and DON'Ts  on the way to over 10M users… IGT – Event July 2011
  • 2. Wix Initial Architecture Server Public Sites Serving Sites Editing API User Authentication User Media upload, searches Public Media upload, management, searches Template Galleries management Database Wix Sites WixML Pages User Authentication Users Media Public Media Template Galleries
  • 3. 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”
  • 4. 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
  • 5. Distributed Cache Next we added EHCache as Hibernate 2nd-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
  • 6. 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?
  • 7. Two years passed We learned what our business is – building websites We started selling premium websites
  • 8. 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 BillingDB Billing (Tomcat) Server (Tomcat) DB statics (Lighttpd) Media storage
  • 9. 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!
  • 10. 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 DB Editor (Tomcat) Editor DB
  • 11. 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 DB Editor (Tomcat) Editor DB
  • 12. Editor & Public Segments What we have learned MySQL is a damn good NoSQLengine 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 DB Editor (Tomcat) Editor DB
  • 13. 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
  • 14. 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 
  • 15. 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
  • 16. 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 http://static.wix.com/client/css/viewer.css?v=327 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
  • 17. 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 Productto 10,000 active users
  • 18. 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
  • 19. 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 Run ITs Compile Unit Tests Self Tests Deploy – IT Env RC QA Self Tests Deploy – QA Env Monitor GA Self Tests Deploy – Production Monitor
  • 20. 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”
  • 21. Some of our Tools