By habit I do one major update of my personal site’s program every year, and the 2020 one is here. This year’s theme is speed — a summary of a year’s technical progress and site optimization.
Coming in This Series
I don’t have the time to write up everything in this update at once, so I’ll publish it as a series of posts. Stay tuned.
I plan to work from the bottom up, publishing continuously across region selection, cloud server configuration, environment setup (JVM), caching strategy, Spring Boot configuration, and front-end page optimization.
Background to This Year’s Update
The theme this year is performance — speed. Before the year started my plan was to adopt the fashionable microservices approach. After a year of research and experimentation I found microservices consumed a huge amount of server resources and weren’t fast: a lot of time went to HTTP requests between services and to serializing and deserializing objects, so performance was actually worse than before. So I dropped the idea of a microservices architecture and started researching how to improve performance instead, trying to make pages open instantly.
What Changed
Everything from the server at the bottom to the front-end pages changed in this update:
-
The server moved from the Beijing region to Hangzhou, which sits in central China radiating north and south and is close to Shanghai’s international gateway.
-
The server disk is now SSD, so the database runs faster on it.
-
Spring Boot with Redis caches the whole site for two hours; the performance improvement is obvious.
-
Brand new site search using Elasticsearch, dropping MySQL full-text search.
-
All front-end pages rewritten, saying goodbye to bloated CSS and JS files — if it doesn’t need to be included, it isn’t.
-
The site and its static files all sit behind a CDN for caching and acceleration, so pages aren’t requested from the server every time.
Results
Based on feedback from friends, pages now open instantly. Here’s the site speed test data:


Next I’ll keep publishing the individual topics, explaining my choices and the reasoning behind them. Stay tuned.
