Times Square is the most visited place globally with about 380,000 pedestrian visitors a day - roughly the same amount of people which go to Wix’s dashboard. Building a page which receives such high traffic requires having great performance and intelligent architecture. In this talk, Eyal will go over the challenges of rebuilding Wix’s dashboard, the architecture and how we got it to load under 1 second.
25. Benefits of Lazy Components
▪ Many small bundles VS one big one (better for incremental performance)
▪ Confidence in deploying individual micro services
▪ Easier to test (unit & integration)
▪ Better perceived performance
Dashboard 2.0
28. Dev Velocity
▪ Devs are spread across multiple projects
▪ Small relatively simple projects
▪ We switch to Wix Serverless
▪ From all FEDs we became all Full Stack Developers
Dashboard 2.0
30. Bundle arrived
Component renders
content
Data starts fetching
Data Arrived
Component renders
Content
Parent loads the lazy
Nothing is rendered
Bundle is fetched in the
background
Fetching Data from Lazy Components
31. Parent loads the lazy
Data/Bundle start
fetching
Data Arrived
Component renders
Content
Nothing is rendered
Bundle is fetched in the
background
Bundle arrived
Component renders
content
Solution: Simultaneous Fetching
36. Browser Throttling
▪ Many microservices means many network calls
▪ HTTP1 limits browsers to 6 concurrent requests to the same host
▪ Requests are stalled while in queue
37.
38.
39.
40. Solution: Switch to HTTP2 & Bulk Requests
▪ No limit of concurrent requests
▪ Identical requests should be “reused” and the response should be shared.
52. Solution: “Calculate” Layout in a Server
▪ Widgets will “register” to the layout service
▪ “Calculations” will be done in the server
▪ Remove build dependency completely
▪ Skeletons will appear only for relevant widgets
▪ Data will be fetched for all in the server, eliminating client-server hop
▪ Server will return lazy components & their relevant data
53. Consider what’s good to SHARE,
and what’s good for you to BREAK APART
Design, behaviors,
common code/packages...
Skeleton,
one big repo...