AWS Partner Network (APN) Blog

Best Practices from IBM and AWS for Optimizing SaaS Solutions for Sustainability

By Raman Pujani, Solutions Architect – AWS
By Shikha Srivastava, Distinguished Engineer and Master Inventor – IBM

IBM-AWS-Partners-5
IBM
Connect with IBM-2

In this post, we will dive deep to understand how software-as-a-service (SaaS) providers can optimize applications by implementing best practice recommendations from Amazon Web Services (AWS). We’ll review a few examples to optimize SaaS applications for sustainability and track the results via dashboard.

IBM and Amazon are both signatories of The Climate Pledge, which is a commitment to reach net-zero carbon emissions by 2040—10 years ahead of The Paris Agreement.

As an AWS Partner and leading global provider of enterprise technologies and services, IBM is committed to leadership in all of its business activities—from operations to the design of its products, use of its technology, and the environment.

Amazon, as part of its mission to be Earth’s most customer-centric company, is committed to building a sustainable business for employees, customers, and communities. AWS in particular is designing data centers that provide the efficient, resilient cloud service customers expect while minimizing the environmental footprint.

In December 2021, AWS launched the Sustainability Pillar of the Well-Architected Framework which defines sustainability in the cloud as a “continuous effort focused primarily on energy reduction and efficiency across all components of a workload by achieving the maximum benefit from the resources provisioned and minimizing the total resources required.”

AWS customers develop, deploy, maintain, and own application software using AWS services and the infrastructure resources underneath. SaaS is typically delivered to customers as a subscription model and is owned, maintained, and delivered by the SaaS provider.

With multi-tenancy and shared infrastructure features, SaaS applications natively inherit key best practices around sustainability in the cloud. However, sustainability is not a destination but rather a journey, and an iterative optimization process. This post explores how to continue the sustainability optimization journey for a SaaS application.

Building Sustainable SaaS on AWS

From a SaaS provider’s perspective, an efficient and sustainable model for designing multi-cloud SaaS applications with global footprint includes:

  • SaaS control plane: With a set of substrate foundation services required by multiple SaaS offerings such as provisioning, onboarding, configuration, management, a SaaS control plane provides a bridge to AWS-native services and the IBM (SaaS provider) back-office. A SaaS control plane hosts multiple SaaS offerings and serves multiple customers (tenants) by using a common set of resources.
    .
    SaaS providers using a single control plane for hosting multiple SaaS offerings can maximize shared resources for onboarding tenants. This helps eliminate waste, low utilization, and idle or unused resources.
    .
  • SaaS data plane: A managed environment for tenants, a SaaS data plane uses the resources only needed to serve a respective tenant’s business requirement (SaaS application), maximizing the value from resources you consume.

IBM-Sustainable-SaaS-1

Figure 1 – SaaS control plane and data plane on AWS with IBM back-office integration.

IBM Automation SaaS products (API Connect, Content Services, Watson Orchestrator) are offered on AWS using the above framework, which reduced time to market by ~40-50%. It also contributed towards sustainability goals by reducing infrastructure and compute consumption for common services required by multiple SaaS offerings. Additional SaaS offerings will leverage the same framework in the future.

The multi-tenant nature of SaaS applications requires architects to reconsider how they address sustainability. The AWS Well-Architected Framework’s Sustainability Pillar highlights design principles for sustainability in the cloud. The framework’s SaaS Lens describes areas to consider for architecting, designing, and deploying multi-tenant SaaS applications.

For this post, we have grouped SaaS architecture areas into four logical groups:

  • Tenant: This is the most fundamental construct of a SaaS environment. It’s important to consider the identity of a tenant, onboarding into a SaaS platform, isolating tenancy, and mechanisms to address noisy neighbors (tenants).
  • Model: SaaS applications can be built with a variety of different architecture models, including silo, pool, and bridge models. It’s also important to consider tenant tiering (services scope and level) into the SaaS application model being deployed.
  • Data: You must make choices about how the multi-tenant data is stored and organized. Will the data be stored in separate database, for example, or will it be comingled in a shared construct? Tenant tiering helps defining data retention and lifecycle policies.
  • Operations: It’s important to have visibility (metrics and insights) into how tenants are using your application and imposing load on your system’s architecture. Tenant-aware operations help to diagnose and evaluate the trends and patterns of activity and consumption of individual tenants.

The AWS Well-Architected Framework’s sustainability pillar recommends best practices for optimizing workload placement and architecture for user behavior patterns, software and architecture patterns, data patterns, hardware patterns, and development and deployment patterns to increase energy efficiency. Each of these areas represents opportunities to reduce the sustainability impact of SaaS applications.

To build SaaS applications that maximize resource efficiency and reduce waste, consider best practice recommendations for SaaS application architecture areas:

User behavior patterns Software and architecture patterns Data patterns Hardware patterns Development and deployment patterns
Tenant .
Model .
Data . .
Operations

Measuring Sustainability Improvements

Measuring and improving existing workloads in the cloud for sustainability is an iterative process over a period of time. The goals of your improvements can be to:

  • Eliminate waste, low utilization, and idle or unused resources.
  • Maximize the value from resources you consume.

Refer to the sustainability pillar documentation to learn more about improvement process.

To measure improvements over time, first understand what you have provisioned in AWS and how those resources are being consumed. Start with a full overview of your AWS usage, and use AWS Cost and Usage Reports to help identify hot spots. Use proxy metrics to measure the resources provisioned to achieve business outcomes; for example:

IBM-Sustainable-SaaS-2

Figure 2 – Example proxy metrics.

Check out this AWS Well-Architected Lab to learn how to derive proxy metrics from AWS Cost and Usage Reports.

Be sure to select business metrics to quantify the achievement of business outcomes. Your metrics should reflect the value provided by your application; for example, per-tenant average vCPU consumption, logs retention storage (GB) used for all tenants, and tenant to vCPU ratio.

Define your sustainability KPI (key performance indicator) using the following formulas:

  • Divide the provisioned resources by the business outcomes achieved to determine the provisioned resources per unit of work. This formula is suitable for technology-related optimizations; for example, CPU utilization and per tenant data storage footprint:

IBM-Sustainable-SaaS-3

  • Multiply the provisioned resources by the business outcome achieved to determine the per unit of work execution duration. This formula is suitable for process-related optimizations; for example, reducing number of days it takes for off-boarding a tenant, and number of hours it takes to run monthly batch cycle:

IBM-Sustainable-SaaS-4

Refer to the sustainability pillar documentation to understand more details about proxy and business metrics, and defining sustainability KPIs.

Example KPIs for Sustainable SaaS Application

Below, we will review a few examples of SaaS application-related use cases and apply sustainability pillar best practice recommendations for measuring the optimization.

User Behavior Patterns

Look at when, where, and how your customers use your SaaS application. Learn more in the documentation.

Sustainability KPI Improvement goal Proxy metric Business metric
Per-tenant average resource consumption during offboarding process Reduce consumed resources once tenant decides to offboard by optimizing offboarding process and timeline (e.g. programmatically reducing tenant offboarding duration with automation) Total resources (vCPU, memory, storage) consumed by tenant during offboarding process Tenant offboarding process duration
Data transfer (GB) over network for analytical reporting Stop periodic analytical report (e.g. SaaS subscription utilization) creation and distribution (e.g. via email) to reduce annual data transfer over network, and host it as web application. Users who need the report will access it via web application, and will avoid unnecessary data transfer for users who do not check these reports regularly. Total data transferred (GB) over network for analytical reporting Frequency of reporting (e.g. use 1 as static number to represent annual reporting cycle)

Software and Architecture Patterns

Look for opportunities to reduce impact by making changes to software and architecture. Learn more in the documentation.

Sustainability KPI Improvement goal Proxy metric Business metric
vCPU duration consumed for monthly billing Reduce vCPU duration for monthly billing report generation by optimizing code, programming language, and data structure Total vCPU duration consumed by report generation Billing cycle frequency (e.g. use 1 as static number to represent a monthly cycle)
Per-tenant average vCPU consumption (count) Reduce average vCPU consumption footprint (count) per tenant by defining tenant tiers and enabling respective software features Total number of vCPU consumed by all tenants Number of tenants (all tiers)

Data Patterns

Look for opportunities to reduce impact by making changes to your data management practices. Learn more in the documentation.

Sustainability KPI Improvement goal Proxy metric Business metric
Logs retention storage (GB) used for all tenants Reduce storage required for storing infrastructure and application logs by defining tenant-tier level log retention policy Total storage used for logs retention Number of tenants (all tiers)
Monthly backup data size (GB) for all tenants Reduce monthly backup data size (GB) by recreating the runtime, configuration, artifacts, dataset, or microservice containers when needed, instead of backing up such data regularly Total backed up data (GB) size for a month Backup reporting cycle (e.g. use 1 as static number to represent monthly cycle)

Hardware Patterns

Look for opportunities to reduce impact by making changes to your hardware management practices. Learn more in the documentation.

Sustainability KPI Improvement goal Proxy metric Business metric
Tenant to vCPU ratio Reduce tenant to vCPU ratio by maximizing resources utilization by adding more tenants on existing infrastructure rather than provisioning additional infrastructure Number of CPUs utilized Number of tenants
Average vCPU required per transaction Reduce per transaction average vCPU required by increasing number of transactions processed using the same number of vCPU Number of vCPUs utilized Number of transactions processed

Development and Deployment Process

Finally, look at your whole software development and deployment lifecycle to support improvements for resource efficiency. Learn more in the documentation.

Sustainability KPI Improvement goal Proxy metric Business metric
Total vCPU consumed by monthly build pipeline for all tenants Reduce resource consumption in build pipeline by automating build and test cycle with on-demand resource provisioning, and aligning the software release as per tenant-tier (e.g. platinum-tier tenant get regular releases, whereas bronze-tier gets at reduced frequency) Total resources consumed by build pipeline Build pipeline frequency (e.g. use 1 as static number to represent frequency)
Number of vCPU consumed by CI/CD tools Reduce number of CI/CD tools (and resources allocated) across organization to optimize pipeline Number of vCPU consumed by CI/CD tools Number of CI/CD tool instances used

Example of Sustainability KPI Dashboard

Create a sustainability KPI dashboard for your teams to measure, track, and report on improvements periodically. Continue to monitor the impact of the improvement over time and make changes to the SaaS application as required. Refer to AWS Well-Architected Labs to learn how to observe sustainability KPIs.

Below is an example of a dashboard tracking identified KPIs improvement across various parameters, including the before and after sustainability impact the respective KPI had.

IBM-Sustainable-SaaS-5

Figure 3 – Example of sustainability KPI dashboard.

IBM Turbonomic’s Sustainable IT Dashboard provides energy consumption metrics and their correlation to IT infrastructure, estimates the carbon impact, and carbon and energy reduction achieved via automation.

Conclusion

By using the design principles and best practices highlighted in this post, SaaS providers can make informed decisions balancing security, cost, performance, reliability, and operational excellence with sustainability outcomes for your SaaS applications on AWS.

Every action you take to reduce resource usage and increase efficiency across your SaaS application contributes in environmental impact and to your organization’s broader sustainability goals.

Resources:

.
IBM-APN-Blog-Connect-2023
.


IBM – AWS Partner Spotlight

IBM is an AWS Competency Partner and leading global provider of enterprise technology and services. Customers around the world rely on IBM’s advanced cloud technologies and on the deep industry and technology expertise of IBM services and solutions professionals and consultants.

Contact IBM | Partner Overview | AWS Marketplace