Jekyll2022-01-14T10:31:52+00:00https://p4nda.co.uk/feed.xmlMatthew SteeplesTechnical Director for Ledgerscope. Software developer with a passion for automationAzure Performance Tidbit #52021-02-27T00:00:00+00:002021-02-27T00:00:00+00:00https://p4nda.co.uk/2021/02/27/azure-performance-tidbit-5<p>Following on from <a href="/2019/11/25/azure-performance-tidbit-4.html">#4</a>, the speed has dropped yet again. The dataset size is the same as it was 12 months ago, but the database it’s importing into now has a billion rows in it. It now imports 10 million new rows in 1 hour 14 minutes, giving an average speed of 2200 records/second</p>Following on from #4, the speed has dropped yet again. The dataset size is the same as it was 12 months ago, but the database it’s importing into now has a billion rows in it. It now imports 10 million new rows in 1 hour 14 minutes, giving an average speed of 2200 records/secondSoftware Quality2020-02-09T00:00:00+00:002020-02-09T00:00:00+00:00https://p4nda.co.uk/2020/02/09/Software-Quality<p>Another one of the benefits of running in the cloud is that someone else manages (and upgrades) the software for you. This can be a double-edged sword though, as it means things can break without any warning too. We’re in an interesting scenario at the moment where Microsoft have broken both the Online version of Outlook…</p>
<p><img src="/assets/Annotation 2020-02-09 215538.png" alt="Online Outlook Problem" /></p>
<p>… and the Desktop version!</p>
<p><img src="/assets/Annotation 2020-02-09 215442.png" alt="Desktop Outlook Problem" /></p>
<p>It doesn’t happen very often, and their communication has definitely got a lot better than it <a href="/2015/01/08/online-service-apologies.html">used to</a>, so that’s something!</p>Another one of the benefits of running in the cloud is that someone else manages (and upgrades) the software for you. This can be a double-edged sword though, as it means things can break without any warning too. We’re in an interesting scenario at the moment where Microsoft have broken both the Online version of Outlook…Azure Performance Tidbit #42019-11-25T00:00:00+00:002019-11-25T00:00:00+00:00https://p4nda.co.uk/2019/11/25/azure-performance-tidbit-4<p>One of the benefits of running in the cloud is that someone else manages (and upgrades) the hardware for you. When I last blogged about this in 2015 it took 4 hours to import the 10 million rows. With no significant changes to my code (there’s only been the odd feature here and there, no more optimisations have been done) a single server now imports this data in 2 hours and 8 minutes. That’s an average rate of 1300 records inserted per second. The cost hasn’t changed either!</p>One of the benefits of running in the cloud is that someone else manages (and upgrades) the hardware for you. When I last blogged about this in 2015 it took 4 hours to import the 10 million rows. With no significant changes to my code (there’s only been the odd feature here and there, no more optimisations have been done) a single server now imports this data in 2 hours and 8 minutes. That’s an average rate of 1300 records inserted per second. The cost hasn’t changed either!App Services2019-01-27T00:00:00+00:002019-01-27T00:00:00+00:00https://p4nda.co.uk/2019/01/27/App-Services<p>On the surface and at their simplest level, <a href="https://azure.microsoft.com/en-us/services/app-service/">App Services</a> are a nice straightforward successor to Cloud Services. They give you slightly less control of the environment in exchange for even less management overhead. To describe them as simply as possible, they’re basically hosted instances of IIS. Scaling up and down happens in seconds as opposed to minutes, and the “application” is managed separately from the “infrastructure” allowing you to have a crazy number (150) of applications running on the same servers. Obviously if you are hosting that many, you may want to pick the larger instance sizes!</p>
<p>Deploying applications has a lot more options as well; accepting packages, building automatically from source or various file synchronisation systems.</p>
<p>There are quite a few additional administrative options that allow some clever use cases. One of these is Deployment Slots. This allows you to have a different version of your application, and seamlessly swap users between the two without any downtime. This can either be done all at once or as a gradual process (known as testing in production).</p>
<p>In true Microsoft style, these services integrate with others. You can deploy SSL certificates and store secrets in Azure Key Vault, you can use the CDN to move static assets closer to your users, and you can log the details of the errors, performance and general health of your application through Application Insights.</p>On the surface and at their simplest level, App Services are a nice straightforward successor to Cloud Services. They give you slightly less control of the environment in exchange for even less management overhead. To describe them as simply as possible, they’re basically hosted instances of IIS. Scaling up and down happens in seconds as opposed to minutes, and the “application” is managed separately from the “infrastructure” allowing you to have a crazy number (150) of applications running on the same servers. Obviously if you are hosting that many, you may want to pick the larger instance sizes!Cloud Services2019-01-13T00:00:00+00:002019-01-13T00:00:00+00:00https://p4nda.co.uk/2019/01/13/Cloud-Services<p>Azure was brand new when we started our project, and it made sense to take advantage of it for a greenfield development. <a href="https://azure.microsoft.com/en-us/services/cloud-services/">Cloud Services</a> were the only way of hosting applications, and they fit our requirements perfectly. They’re not popular anymore, and although they’re still offered they have been pretty much phased out with more up to date offerings.</p>
<p>The basic overview of them was that you had a VM preconfigured with Windows and IIS, and you packaged your application up for it to be deployed through the Azure Portal. You could scale up and down with about 25 minutes notice (the time it took to allocate a new VM and deploy your package to it). If you were coming from the traditional ASP.NET application background then there were very few changes that you needed to make for compatibility.</p>
<p>Background tasks were handled by Worker Roles, which were basically VMs that just ran an executable. We didn’t really make use of these, and instead ran code in a separate thread on our Web roles to keep costs down.</p>
<p>The system itself required next to no maintenance. Everything was preinstalled and Windows Updates were applied automatically each month. High availability meant having 2 instances running, so the main shocker for most people was moving away from Session State. Deploying a new version of your application could use separate deployment slots so you could “stage” them and make sure they worked fine, or you could roll out your changes to half of the cluster and then swap over.</p>
<p>It was definitely a good start into the world of Platform as a service, but the functionality it offered has (for us at least) been replaced by 3 other complementing services.</p>
<p>Details of them are to follow…!</p>Azure was brand new when we started our project, and it made sense to take advantage of it for a greenfield development. Cloud Services were the only way of hosting applications, and they fit our requirements perfectly. They’re not popular anymore, and although they’re still offered they have been pretty much phased out with more up to date offerings.Yak Shaving 12018-11-10T00:00:00+00:002018-11-10T00:00:00+00:00https://p4nda.co.uk/2018/11/10/Yak-Shaving-1<p>One of my team came to me the other day and said that the amount of “issues” that we’re having to deal with on a daily basis was starting to mount and we were spending as much (if not more) time trying to get our own environments working as we were furthering the product.</p>
<p>It’s quite amazing how much time these things can take up. An Assembly Binding Redirect can easily take 20 minutes of your time, not to mention the associated context switch when you have to stop working on what you were planning on debugging and fix the issue before you can carry on. Do Not Pass Go, Do Not Collect £200. There’s a list of things that have been getting to us recently, and it’s all part of growing up and becoming a larger team.</p>
<p>One issue which has bitten us recently which I always thought was a bit of an “overhead” in larger companies and had mostly gone away is “development dependencies”. Now this isn’t a case of libraries in your project (as that has mostly been solved by NuGet) but what tools and frameworks you need installed on your development machine. The specific case we encountered is the “.NET 4.5.2 Targeting Pack”. This is a required component for doing any CRM SDK work, and needs to be deployed on each developer machine to open up the projects. Communicating this out to developers in an efficient way is quite tricky. We use a management system that allows us to remotely deploy software, but it doesn’t appear to work as well as you’d hope and diagnosing issues with it can frequently take longer than manually installing the apps themselves.</p>
<p>Basically, the environment for developing software is constantly evolving, and the tooling at the moment doesn’t seem to be well equipped to handle frequent small changes.</p>One of my team came to me the other day and said that the amount of “issues” that we’re having to deal with on a daily basis was starting to mount and we were spending as much (if not more) time trying to get our own environments working as we were furthering the product.Adventures in Azure2018-10-22T00:00:00+00:002018-10-22T00:00:00+00:00https://p4nda.co.uk/2018/10/22/Adventures-In-Azure<p>The day job involves a lot of cloud computing (our server bill is our second biggest cost after people) and we like to stay ahead of the curve where possible. We’ve been in Azure since the beginning with this project, and it’s enabled us to develop and scale quickly, using fewer developers and IT professionals than if we were looking after it all ourselves. It hasn’t always seemed as straightforward as we’d have liked it to be, so this blog is going to give a bit of history and documentation into our processes.</p>
<p>Here’s a fairly comprehensive list of the Azure services that we make use of at the moment (in no particular order):</p>
<ul>
<li><a href="/2019/01/27/App-Services.html">App Services</a></li>
<li>WebJobs</li>
<li>Sql Azure</li>
<li>Blob Storage</li>
<li>Table Storage</li>
<li>Queue Storage</li>
<li>Service Bus</li>
<li>Virtual Machines</li>
<li>VPN (and Gateway)</li>
<li>DevOps</li>
<li>Redis</li>
<li>Batch</li>
<li>Functions</li>
<li>Key Vault</li>
<li>Application Insights</li>
<li>Azure AD</li>
<li>CDN</li>
<li>Bot Service</li>
</ul>
<p>For the most part, each item in the list above represents something that we didn’t have to code and, beyond the initial consultation, we don’t have to maintain. Vendor lock in is always a concern and something we take into consideration, but for the most part the services are the correct size that if we want to replace them with something else then we can do.</p>
<p>There are also some pieces that we used to use but don’t anymore for various reasons:</p>
<ul>
<li><a href="/2019/01/13/Cloud-Services.html">Cloud Services</a></li>
<li>Automation</li>
</ul>
<p>Additionally,there are a few Azure services that we’ve evaluated and not chosen, and I think the stories behind them are just as valuable:</p>
<ul>
<li>DNS</li>
<li>CosmosDB</li>
<li>Containers</li>
<li>Service Fabric</li>
<li>Traffic Manager</li>
<li>Event Grid</li>
<li>Azure AD B2C</li>
</ul>
<p>Usual disclaimers apply, your mileage may vary etc</p>The day job involves a lot of cloud computing (our server bill is our second biggest cost after people) and we like to stay ahead of the curve where possible. We’ve been in Azure since the beginning with this project, and it’s enabled us to develop and scale quickly, using fewer developers and IT professionals than if we were looking after it all ourselves. It hasn’t always seemed as straightforward as we’d have liked it to be, so this blog is going to give a bit of history and documentation into our processes.CMB Showcase2015-05-17T00:00:00+00:002015-05-17T00:00:00+00:00https://p4nda.co.uk/2015/05/17/CMB-Showcase<p>Last week I was fortunate enough to be exhibiting our freshly released <a href="https://checkmybooks.co.uk">Checkmybooks</a> at <a href="https://www.accountex.co.uk">Accountex</a> to a warm and receptive crowd. Standing in front of an 8ft tall print out (Go SVGs!) of the most useful screen of our product definitely made my week. As our founder himself is a chartered accountant, we’ve always known that the product is useful and fills a very real purpose, and I couldn’t pass up the opportunity to be able to see what people thought of it in person.</p>
<p>It was exciting to be able to demonstrate what we’ve been hard at work on for the past few years, and to see the looks on people’s faces as they worked out how much time it would save them for every client they had. It was very interesting to see how many of the accountants we talked with not only understood but had first-hand experience of the three main problems that we’re solving with Checkmybooks:</p>
<ul>
<li>The pain of retrieving backups of accounting files from clients</li>
<li>Spending time looking through the accounts for mis-postings</li>
<li>Making sure that any adjustments they make get passed back to the client and entered in correctly.</li>
</ul>
<p>What was even more valuable for us though, was the feedback we were getting as we were talking with accountants. The majority of the recommendations (we’re pleased to say) were already on our to-do list, but there were a handful of suggestions that we’d not thought of that are going to make their way into Checkmybooks. This is the first of many milestones for Checkmybooks, as we’re going to continuously evolve and improve the application, and this past week has reinforced that we’re heading in the right direction.</p>Last week I was fortunate enough to be exhibiting our freshly released Checkmybooks at Accountex to a warm and receptive crowd. Standing in front of an 8ft tall print out (Go SVGs!) of the most useful screen of our product definitely made my week. As our founder himself is a chartered accountant, we’ve always known that the product is useful and fills a very real purpose, and I couldn’t pass up the opportunity to be able to see what people thought of it in person.Azure Performance Tidbit #32015-02-22T00:00:00+00:002015-02-22T00:00:00+00:00https://p4nda.co.uk/2015/02/22/azure-performance-tidbit-3<p>Just a short one today. Ran a larger query on the dataset that I’ve been querying recently, and generated a 120mb Excel file containing 1.4 million rows in less than 24 minutes. Average speed there (end to end) of 965 records per second.</p>
<p>Now just working on getting the UI in place and I can ship this!</p>Just a short one today. Ran a larger query on the dataset that I’ve been querying recently, and generated a 120mb Excel file containing 1.4 million rows in less than 24 minutes. Average speed there (end to end) of 965 records per second.Azure Performance Tidbit #22015-02-12T00:00:00+00:002015-02-12T00:00:00+00:00https://p4nda.co.uk/2015/02/12/azure-performance-tidbit-2<p>Continuing on with the aforementioned side project, I tried some scaling up. I’d made a mistake in the design of the table so it was easier to bin it all and re-import it. I decided to see if running the imports in parallel would speed things up, and I was not disappointed!</p>
<p>Running a single instance resulted in importing 10 million rows in approximately 4 hours (roughly 700 records per second). I spun up a couple more servers and let the import carry on going and the import time remained at 4 hours! I know obviously that won’t scale linearly and infinitely but for my needs it meant that I’d just slashed the amount of time I had to wait by two thirds and I was getting an <strong>average</strong> throughput of 2100 rows per second! Due to the nature of “Pay as you go” in the cloud, I’d also done this without really increasing my costs! Running 3 servers for 4 hours costs the same as running 1 server for 12 hours.</p>
<p>I’d made this change to improve the query performance, as defining your keys is something you need to do in the beginning and can massively affect the speed at which you retrieve data out of it. The queries that I’m running on this data usually involve about 410 requests and return 33,000 records. With my old design this took about 30 minutes, which works out at 19 rows per second. Not bad (considering the size of the dataset) but at the same time not great. After the re-design the data comes out in 78 seconds! That’s an average of 425 rows per second.</p>Continuing on with the aforementioned side project, I tried some scaling up. I’d made a mistake in the design of the table so it was easier to bin it all and re-import it. I decided to see if running the imports in parallel would speed things up, and I was not disappointed!