Skip to content

Commit

Permalink
chMerge branch 'gh-pages' of https://github.com/acanham-scottlogic/blog
Browse files Browse the repository at this point in the history
… into gh-pages
  • Loading branch information
acanham-scottlogic committed Oct 2, 2024
2 parents a8865a7 + 4508774 commit c0d208a
Show file tree
Hide file tree
Showing 9 changed files with 62 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/auto-compress-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Compress Images
uses: calibreapp/image-actions@main
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-a11y-of-changed-content.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20.10.x
node-version: 20.x
cache: npm

- name: Install NPM dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/generate-related.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16.13.x
node-version: 20.x
cache: npm
- run: npm install
- run: npm run compute-embeddings --OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/remove-unused-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16.13.x
node-version: 20.x
cache: npm
- run: npm install
- name: Remove Unused Images
Expand Down
2 changes: 1 addition & 1 deletion _data/authors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ authors:
picture: blogpic.jpg
awhitmell:
name: "Andrew Whitmell"
author-summary: "Associate developer at Scott Logic based in the Newcastle office. When not bashing keyboards, I can usually be found playing with a Labrador or looking at guitars I can't afford."
author-summary: "Developer based in Newcastle."
picture: awhitmell.jpg
bdimitrov-SL:
name: "Bogdan Dimitrov"
Expand Down
2 changes: 1 addition & 1 deletion _posts/2024-09-12-introducing-our-tech-carbon-estimator.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ While the Estimator is not suitable for formal reporting purposes, we believe it

## Try the Technology Carbon Estimator Today

We invite you to try out our Technology Carbon Estimator for yourself. Input your organisation's data, see how changes can affect the output, and gain insights into where your biggest opportunities for carbon reduction might lie. And of course, we're here to help you interpret and act on your results – don't hesitate to reach out to us for a deeper discussion of your findings and next steps.
We invite you to try out our Technology Carbon Estimator for yourself (available on the [Technology Carbon Standard](https://www.techcarbonstandard.org/estimator) and [Scott Logic](https://www.scottlogic.com/technology-carbon-estimator) sites). Input your organisation's data, see how changes can affect the output, and gain insights into where your biggest opportunities for carbon reduction might lie. And of course, we're here to help you interpret and act on your results – don't hesitate to reach out to us for a deeper discussion of your findings and next steps.

By providing this tool, we hope to empower organisations to take meaningful action on their technology carbon footprint. While it's just one step on the journey to sustainability, we believe it's an important one. Try the estimator today and join us in working towards a more sustainable future for technology.

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
title: Performance testing - the often overlooked ingredient in web application success
date: 2024-09-17 09:00:00 Z
categories:
- Testing
summary: Testing the performance of an application can often give more insights than
expected. From improving security, to cutting costs, performance testing ultimately
contributes to user satisfaction and business success.
author: awhitmell
image: "/uploads/Performance%20testing%20thumbnail.png"
---

In today's fast-paced digital landscape, the performance of a web application has a direct impact on user satisfaction, business success, and overall competitiveness. Whether it's the speed of page loads, scalability under heavy traffic, or the smoothness of key interactions, users expect applications to perform flawlessly. Performance testing is essential for identifying and addressing potential issues before they affect real users, ensuring an optimised and reliable experience. From improving resource utilisation to enhancing security and boosting SEO rankings, comprehensive performance testing is playing an ever-growing role in the success of applications. This blog explores some of the key benefits of benchmarking performance.

## Enhance user experience
Performance testing plays a crucial role in enhancing the user experience of web applications. Slow load times, unresponsive features, or frequent crashes drive users away quickly, leading to high bounce rates and poor engagement. [A study by Google](https://www.thinkwithgoogle.com/_qs/documents/2340/bc22e_The_Need_for_Mobile_Speed_-_FINAL_1.pdf) found that 53% of mobile users abandon a site if it takes longer than 3 seconds to load, they also found that sites which load within 5 seconds boast a 35% lower bounce rate, and 70% longer average session time, compared to their slower counterparts. This demonstrates how critical load testing (testing performance under typical and peak usage conditions) is in retaining users and ensuring a seamless experience across devices and platforms. By simulating various scenarios, such as peak traffic loads or different network conditions, testing performance helps identify areas where speed and responsiveness can be improved, ensuring a smooth and consistent experience for all users.

Beyond speed, users expect web applications to work flawlessly without issue during critical interactions like form submissions, payments, or media playback. Poorly optimised applications lead to a frustrating user journey, where features lag or malfunction at key moments. By conducting thorough load tests, these issues can be identified and mitigated before they affect real users. In the long term, this builds user trust and loyalty, as they are more likely to stick with applications they know performs reliably.

## Ensure scalability
Web applications must be designed to scale as demand grows. Whether a business is experiencing gradual growth or anticipating a sudden surge due to marketing campaigns, holidays, or special events, scalability is essential for ensuring consistent performance. Scalability testing (assessing the system's ability to scale up efficiently as the load increases) enables businesses to simulate these scenarios, revealing how an application responds under various levels of stress. Dedicated tools can simulate thousands of virtual users simultaneously, helping businesses understand their application's breaking point and when more server resources or optimisations are needed.

A widely quoted [study by the Aberdeen Group](https://info.headspin.io/hubfs/Analyst%20Reports/5136-RR-performance-web-application.pdf) found that for e-commerce sites, "a 1-second delay in page load time equals 11% fewer page views, a 16% decrease in customer satisfaction, and 7% loss in conversions". While that study shows the fiscal impact of a slow service, the research itself dates back to 2008, but since then expectations have shifted, with users wanting even more speed. Proper scalability testing helps businesses prevent these missed opportunities. Ensuring that infrastructure can support traffic surges without degradation in performance, allows businesses to capitalise on high-demand periods rather than face potential outages or slowdowns.

## Identify bottlenecks
One of the most effective ways to uncover bottlenecks within an application is through performance testing. Bottlenecks, whether caused by inefficient code, slow database queries, or network latency, can degrade the overall performance of an application. During these tests, various components of the system - such as CPU usage, memory, database response times, and network traffic – can be monitored to pinpoint the exact source of the delay. For example, a heavy reliance on server-side processing could cause the backend to overload under pressure, or large unoptimised images might slow down front-end loading times. By identifying these bottlenecks early they can be addressed, optimising system performance before users experience noticeable lags or errors.

Addressing bottlenecks also helps reduce infrastructure costs. When performance issues are resolved, applications run more efficiently and require fewer resources to handle the same traffic. This optimisation ensures that businesses can maintain high-performance standards without overspending on additional servers or cloud infrastructure.

## Optimise resource utilisation
Stress testing (examining how an application performs under extreme conditions, often beyond its normal operational capacity) is essential for optimising resource utilisation in web applications, ensuring that the application runs efficiently without wasting valuable server capacity. Modern applications rely on a combination of resources, including CPU, memory, and network bandwidth, and their usage needs to be carefully managed to prevent underutilisation or overconsumption. A well-executed soak test (testing how a system performs over an extended period under a sustained load) can reveal inefficiencies, such as memory leaks or excessive CPU usage, allowing these processes to be optimised before they affect the live environment. By addressing these issues, businesses can ensure that their applications run smoothly, even under peak loads, without the need to over-provision costly resources.

Optimising resource usage not only improves application performance but also leads to significant cost savings, particularly for cloud-based applications where resource consumption directly impacts operational expenses. [A 2020 study by Flexera](https://www.flexera.com/about-us/press-center/flexera-releases-2020-state-of-the-cloud-report) found that companies overspend on cloud services by an estimated 30% due to inefficiencies like over-provisioned resources. Soak testing helps businesses fine-tune their resource allocations, ensuring that applications use just the right amount of processing power and storage, which can dramatically reduce costs. This approach allows companies to invest more efficiently in their infrastructure, providing a high-performing application while keeping expenses under control.

## Prevent security vulnerabilities
Performance testing is not just about speed; it also helps identify potential security vulnerabilities that may arise due to high traffic or resource strain. Poorly performing applications can open doors to denial-of-service (DoS) attacks or other exploits when overwhelmed by traffic. Spike testing (evaluating how an application reacts to sudden, extreme increases in traffic load) with various load conditions ensures that the application can withstand malicious attempts to crash or breach it. By addressing these vulnerabilities, developers can safeguard the application's integrity, protecting both the business and its users.

Security vulnerabilities often emerge when applications are stressed or overloaded, and load testing helps expose these weak points. By subjecting the application to various stress tests, developers can evaluate how the app reacts under pressure, ensuring it remains secure and stable even in extreme conditions. This testing phase allows for the timely implementation of security patches and hardening measures, minimising risks, and improving the overall resilience of the application.

## Validate compliance with SLAs
Service Level Agreements (SLAs) outline the expectations for performance, availability, and responsiveness between service providers and clients. Performance testing helps ensure that web applications meet these critical benchmarks by simulating real-world conditions allowing the evaluation of the application's ability to stay within agreed-upon metrics. Whether the SLA requires a web page to load within two seconds or guarantees 99.9% uptime, rigorous soak testing helps bring the application to a point where it delivers the promised experience and provides tangible proof when it does.

In 2016, [a Ponemon Institute study](https://www.vertiv.com/globalassets/documents/reports/2016-cost-of-data-center-outages-11-11_51190_1.pdf) showed that unplanned downtime, which could easily be caused by performance deficiencies, was costing businesses an average of approximately $9,000 per minute, with [more recent studies](https://itic-corp.com/itic-2021-global-server-hardware-server-os-reliability-survey-results) putting that number as high as $83,000 per minute for large enterprises. By validating performance against SLAs, organisations not only ensure compliance but also protect their bottom line and customer trust.

## Boost SEO ranking
Finally, performance testing has a direct impact on SEO rankings. Studies show that search engines, such as Google, factor in page load times and overall user experience when determining website rankings. Slow or poorly performing applications lead to higher bounce rates, signalling to search engines that the content is not valuable or relevant to users. By optimising an application's performance through stress testing, load times can be improved, bounce rates reduced, and overall user engagement enhanced - all of which contribute to a better SEO ranking.

A high-performing application ensures faster interactions and better user retention, both of which are favoured by search algorithms. With improved performance, applications are more likely to rank higher in search results, attracting more organic traffic. This, in turn, boosts visibility, drives growth, and increases the chances of business success. Therefore, performance testing is not just a technical necessity; it is a strategic move to boost an app's discoverability and market reach.

## Conclusion
In a world where user expectations are higher than ever, testing performance no longer seems optional, but rather a necessity for any successful web application. Users expect fast, reliable, and secure experiences, and businesses must meet these demands to stay ahead. Comprehensive performance testing not only ensures smooth interactions and scalability but also helps prevent costly downtimes and security breaches. Performance testing tools come in all shapes and sizes, covering almost all common programming languages. Many of these tools are free, open-source, and come with comprehensive documentation helping developers write their first test. By leveraging these tools to proactively identify and address performance issues, companies can optimise their resources, improve user satisfaction, and enhance their SEO rankings, ultimately driving growth and long-term success.
6 changes: 3 additions & 3 deletions _posts/2024-10-01-terraform-vs-cdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ If you're familiar with CDK, Terraform modules are the Terraform equivalent of C

However if you want an architecture which is incredibly tight security-wise, it's common practice to resort to only using locally defined modules, so that the code is explicit on every single resource created.

## Getting to grips with CDK
# Getting to grips with CDK

If you have any experience with TypeScript, JavaScript, Python, Java, C# or Go, then you can already code CDK. There is no new language to learn, you can integrate it entirely into your codebase.
As there’s no need to learn an entire language before you can start to write up resources, this results in a quicker initial learning curve. I noticed this on my upskilling project. Devs who had never touched AWS or Terraform picked up on CDK quicker than people tend to do with Terraform. In part because there were fewer barriers with language, layout and syntax.
Expand All @@ -164,7 +164,7 @@ A great example is the automatic creation of subnets (public and private), NAT g
});
</code></pre>

This drastically cuts down on the lines of code needed to deploy resources, as well as reducing the time taking working on connecting resources up.
This drastically cuts down on the lines of code needed to deploy resources, as well as reducing the time taken working on connecting resources up.

To demonstrate this, I'll show the following architecture on both Terraform and CDK.

Expand Down Expand Up @@ -447,7 +447,7 @@ While this can be incredibly useful for someone more used to object-oriented cod

That being said, I’ve definitely saved some time with CDK and found that other developers new to the cloud have picked it up well.

## So..... Which one's "better"?
# So..... Which one's "better"?

Well like with most tech… it depends….
Personally I’d lean towards Terraform, however that could be more to do with my familiarity with the tech, the explicitness which comes with the lack of abstraction, and my love of high quality documentation and (somewhat) asynchronous development.
Expand Down
Binary file added _uploads/Performance testing thumbnail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c0d208a

Please sign in to comment.