What British cycling can teach us about software projects
Digital transformations don't have to be expensive, complex and risky projects. Often a number of small improvements can add up to a significant overall performance improvement.
A quick guide to ASP.NET cache locking high traffic websites during migration, for our fellow developers.
Here we tell the story of migrating a major client's website over to new servers. Much faster servers, which by the end of the project reduced average page server time from 600ms to 60ms.
During testing, we kept seeing CPU spikes, database locks, and eventually lots of timeouts. It turned out that the cause was the way the ASP.NET cache was implemented.
The implementation (similar to most implementations) was similar to this:
The problem was that if there ever was a database slowdown, a long query, table lock, etc, thousands of requests per second would hit this method. Because the first request was still trying to get the expensive object from source, it wasn't in the cache yet. Which means every other request was trying to get it from source.
The result? A tiny blip in DB performance turned into a much larger problem of 503 errors, servers started sweating, and everyone got mad.
At the root of the issue is the fact that we want all other requests to wait nicely in line while the first one gets the expensive object from source, instead of all trying to pummel the database at the same time. So we needed to somehow lock the cache.
However, locking is fraught with dangers. With high traffic and thousands of concurrent website hits, we had to get this right.
After extensive research and testing, this was our solution:
The finished code looked a little different, but the sample shows the main points:
We have vast experience of migrating websites, from small scale to high traffic websites.
We're a software development agency specialising in Umbraco, an ASP.NET Content Management System (CMS). Need help migrating your website to Umbraco from Wordpress, or migrating to Umbraco 8?
As an Umbraco registered partner, we can help. Let's talk.
Digital transformations don't have to be expensive, complex and risky projects. Often a number of small improvements can add up to a significant overall performance improvement.
Digital transformations and IT projects can be extremely costly and if you’re not a business leader with a tech specialism, it’s not always easy to hold your project team to account. Join Everest Managing Director, Samuele Armondi in this hands on, one hour session and learn how to keep control IT projects.
How can you make sure that your project is going to be successful and deliver value? Discovery can help.