2. About Me
• WordPress Plugins Developer
– Since 2003
– Created > 22 plugins
• wp-pagenavi, wp-polls, wp-postratings, wp-postviews,
wp-dbmanager, etc
• http://profiles.wordpress.org/gamerz
• Tech Guy in Tech in Asia
– Started officially on 1st September 2014
– We are still hiring
Lester Chan (@gamerz) [ 2 ]
3. Timeline
• July 2014
– Willis approached me to join Tech in Asia and
expand the engineering team
• August 2014
– Hired an awesome engineer, Li Soon
– Both of us started work to scale Tech in Asia
Lester Chan (@gamerz) [ 3 ]
4. Previous Servers
• Previous
– Digital Ocean
• 1 server
• 32 GB/12 CPUS, 320 GB SSD Disk and 7TB transfer
• US$320/month
• Crashed when we have about 500 users online at the
same time
Lester Chan (@gamerz) [ 4 ]
5. Current Servers
• Current
– SoftLayer
• Catalyst Startup Program
• USD$10,000 credits per month
• 5 Bare Metal Servers
– 1x Load Balancer
– 3x Web Servers
– 2x Database Server
– 1x Ops Server
• Highest recorded users online is 2,734
Lester Chan (@gamerz) [ 5 ]
7. User Uploaded Files
• /wp-content/uploads
– File uploads are stored here
• GlusterFS
– Write once, read everywhere
• Distributed architecture for syncing files
• Avoids a single point of failure (i.e. NAS)
Lester Chan (@gamerz) [ 7 ]
8. WordPress
• Moved WordPress to a folder /core/
– Prevent automated attacks
– /core/ is a git checkout of WordPress
• HTTPS
– Encrypts sensitive data between computers
– Prevents man in the middle attacks
– Ranking boost in Google SEO
Lester Chan (@gamerz) [ 8 ]
9. Cleaning Up Plugins
• Removed 48 plugins
– From 83 plugins to 35 plugins
• Some plugins are poorly coded
– No uninstall.php
• Manually removed plugin options from wp_options
table
– Remove meta
• Comment
• Post
• User
Lester Chan (@gamerz) [ 9 ]
10. CDN
• Previous
– EdgeCast
• Horrible UI/UX admin interface
• No free shared SSL cert
• Current
– MaxCDN
• Free for us
• YC Deal
Lester Chan (@gamerz) [ 10 ]
11. Redesigning Theme
• The TiA theme was poorly coded
– No proper use of WordPress API
– Unnecessary SQL queries all over the place
– Not minifying CSS/JS
– Unused features still in code
Lester Chan (@gamerz) [ 11 ]
12. Redesigning Theme
• Rewrote the theme from scratch
– Removed unused or unnecessary features
– Use of SVG and Font Icons
– Flatter UI
– CSS/JS more efficient
• Combine + Minify
– Caching
Lester Chan (@gamerz) [ 12 ]
13. Web Stack
• Previous
– Apache
– PHP
– MySQL
• Current
– nginx
– HHVM
– MariaDB
Lester Chan (@gamerz) [ 13 ]
15. Questions?
• Any questions?
• You can also find me at
– Blog: https://lesterchan.net
– Twitter: @gamerz
– Facebook: https://fb.com/lesterchan
– Instagram: @gamerz
Lester Chan (@gamerz) [ 15 ]