Enriching Cloud-native Applications with Sustainability Features
Status:: 🟩
Links:: Sustainability Aware Microservices
Metadata
Authors:: Vitali, Monica; Schmiedmayer, Paul; Bootz, Valentin
Title:: Enriching Cloud-native Applications with Sustainability Features
Date:: 2023
URL:: https://ieeexplore.ieee.org/document/10305842
DOI:: 10.1109/IC2E59103.2023.00011
Vitali, M., Schmiedmayer, P., & Bootz, V. (2023). Enriching Cloud-native Applications with Sustainability Features. 2023 IEEE International Conference on Cloud Engineering (IC2E), 21–31. https://doi.org/10.1109/IC2E59103.2023.00011
Due to the ever-growing demand for computational resources, the environmental impact of data centers is continuously increasing. Recently, a great effort has been made to mitigate this impact, while the demand for computational resources has continued to grow. Current mitigation strategies focus on the infrastructure perspective, while the application perspective has been neglected. This paper aims to engage application designers and developers on the path to greener application design. Following the Sustainable Application Design Process (SADP) methodology, we introduce a Sustainable Application Design Architecture (SADA) for enriching cloud-native application components with sustainability features that can be exploited to adapt the application workflow to the environmental context. The architecture enables synergies from design to deployment between all stakeholders involved in the application management. The paper focuses on enriching the application with sustainability features in the design and development phases. We also present and discuss a prototype that can translate design-level sustainability features into development features.
Notes & Annotations
Color-coded highlighting system used for annotations
📝 Note (last modified: 2024-01-22#17:15:22) (
Key Points
-
Microservices sind der vorherrschende Architekturstil in Cloud-native Applikationen.
-
Angesichts des signifikanten Energieverbrauchs und der THG-Emissionen sollten Cloud-native Applikationen mit mehr Bewusstsein für Nachhaltigkeit entwickelt werden.
-
Für die Erreichung eines “Sustainable Application Designs” wird ein Prozess (SADP) und eine Architektur (SADA) vorschlagen.
-
Für die Modellierung der Microservices-Interaktionen wird die Nutzung von BPMN vorgeschlagen.
-
3 Rollen sind für SADP relevant: Applikation Designer (Architekt), Application Developer, Infrastructure Provider
-
SADP besteht aus drei Teilen:
-
Sustainability Awareness
- Beschreiben der Anforderungen und Fähigkeiten der einzelnen Microservices
- Sinnvoll die passende Menge an Rechen-Ressourcen und den besten Ort fürs Deployment zuweisen
-
Microservice Classification
- optional oder obligatorisch?
- → Anwendungsworkflow kann je nach aktuellem Ausführungskontext oder bei einem Mangel an grünen Energiequellen angepasst werden
-
Microservice Enrichment
- Microservices in verschiedenen Variationen implementieren mit unterschiedlichen funktionalen und nicht-funktionalen Eigenschaften
- → adaptiver workflow
-
-
Sustainable Application Design Architecture besteht aus drei Sub-Systemen:
-
Sustainable Application Design
- Applikationsdesign mit Nachhaltigkeitsfeatures aus SADP ermöglichen
-
Web Service Development Framework
- Microservices mit relevanten Metadata ausstatten (z.B. “optional”)
- Metadaten werden über Endpunkte (z.B. REST API) verfügbar gemacht
- Spezifische Varianten von einer Funktionalität werden ggf. implementiert
- Metadaten austauschen und Abgleich mit modelliertem Application Design
-
Sustainability-Aware Deployment System
- Nutzung der Metadaten zur Laufzeit, um sinnvolle Entscheidungen treffen zu können, wie die Applikation deployed und verwaltet wird
-
📑 Annotations (imported on 2024-01-23#10:38:12)
From a research perspective, two complementary approaches have been proposed for reducing the environmental impact of data centers: (i) design efficient facilities [2] and (ii) improve server utilization [3].
[2] J.-M. Pierson, G. Baudic, et al., “Datazero: Datacenter with zero emission and robust management using renewable energy,” IEEE Access, vol. 7, pp. 103 209– 103 230, 2019.
[3] M. Pedram, “Energy-efficient datacenters,” IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, vol. 31, no. 10, pp. 1465–1484, 2012.
It will become essential that applications are also designed and executed based on their environmental footprint. At the same time, an evolution in the architectural style of the applications has been observed, moving from monolithic to cloud-native applications, designed to take advantage of the characteristics of cloud computing [7] [8] and becoming the de facto standard in industry [9].
[7] N. Kratzke and P.-C. Quint, “Understanding cloud-native applications after 10 years of cloud computing - a systematic mapping study,” Journal of Systems and Software, vol. 126, pp. 1–16, 2017.
[8] D. Gannon, R. Barga, and N. Sundaresan, “Cloud-native applications,” IEEE Cloud Computing, vol. 4, no. 5, pp. 16–21, 2017.
[9] CNCF, “Cloud Native Computing Foundation Annual Survey 2021,” CNCF, Tech. Rep., 2022. [Online]. Available: https://www.cncf.io/wp-content/uploads/2022/02/CNCF-AR_FINAL-edits-15.2.21.pdf.
We aim to increase the sustainability awareness of the stakeholders involved in cloud-native application management, from design to deployment, and to support the development of sustainable applications by enriching them with metadata to be exploited for more efficient deployment. Starting from the general Sustainable Application Design Process (SADP) [10], we present an architecture supporting the methodology and define the components needed for its enactment. Additionally, we implemented and tested a prototype on two use cases.
[10] M. Vitali, “Towards greener applications: Enabling sustainable-aware cloud native applications design,” in International Conference on Advanced Information Systems Engineering, Springer, 2022, pp. 93–108.
@Vitali.2022.GreenerApplications
A more comprehensive approach to sustainability in cloud computing has been presented by Gill and Buyya [15], through a set of taxonomies for several aspects of Cloud Data Centers sustainability taking the cloud providers’ perspective. The considered aspects include application design, sustainability metrics, capacity planning, energy management, and virtualization.
[15] S. S. Gill and R. Buyya, “A Taxonomy and Future Directions for Sustainable Cloud Computing: 360 De- gree View,” ACM Computing Surveys, vol. 51, no. 5, 104:1–104:33, Dec. 18, 2018, ISSN: 0360-0300. DOI: 10.1145/3241038. [Online]. Available: https://doi.org/10.1145/3241038 (visited on 03/22/2023).
The cloud provider perspective is also adopted by exploiting the intermittent availability of renewable energy by Thi, Pierson, and Da Costa, Hu, Li, and Sun [16], [17], involving operations such as server consolidation [3], [18] and shutdown policies to ensure a trade-off between energy efficiency and performance [19].
[3] M. Pedram, “Energy-efficient datacenters,” IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, vol. 31, no. 10, pp. 1465–1484, 2012.
[18] N. Gholipour, E. Arianyan, and R. Buyya, “A novel energy-aware resource management technique using joint vm and container consolidation approach for green computing in cloud data centers,” Simulation Modelling Practice and Theory, vol. 104, p. 102 127, 2020.
[19] A. Benoit, L. Lefevre, et al., “Reducing the energy consumption of large-scale computing systems through combined shutdown policies with multiple constraints,” Int. Journal of High Performance Computing Applications, vol. 32, no. 1, pp. 176–188, 2018.
Energy reduction should be a shared responsibility between the cloud provider and the application provider (or cloud consumer) [22]. However, application providers usually lack information to improve their environmental impact [23] while, on the other hand, cloud providers see the applications they host as black boxes [11].
[22] Amazon Web Service, “AWS Well-Architected Framework,” AWS, Tech. Rep., 2023. [Online]. Available: https://docs.aws.amazon.com/pdfs/wellarchitected/latest/framework/wellarchitected-framework.pdf
@AmazonWebServices.2023.SustainabilityPillarAWS
[23] S. Vos, P. Lago, et al., “Architectural tactics to optimize software for energy efficiency in the public cloud,” in 2022 International Conference on ICT for Sustainability (ICT4S), Jun. 2022, pp. 77–87. DOI: 10.1109/ICT4S55073.2022.00019.
@Vos.etal.2022.ArchitecturalTacticsOptimize
[11] V. Andrikopoulos and P. Lago, “Software Sustainability in the Age of Everything as a Service,” in Next-Gen Digital Services, ser. Lecture Notes in Computer Sci- ence, Springer International Publishing, 2021, pp. 35-47, ISBN: 978-3-030-73203-5. DOI: 10.1007/978-3030-73203-5_3. [Online]. Available: https://doi.org/10.1007/978-3-030-73203-5 _3 (visited on 03/22/2023).
Limited attempts have been made to include sustainability in the application design of Green Information Systems (Green IS) by taking the application provider’s perspective. An empirical approach towards energy efficiency of applications in the cloud from the application provider perspective, focusing on architectural aspects, is discussed by Vos, Lago, et al. [23]. Vos, Lago, et al. classify tactics into three categories: resource monitoring (workload energy assessment), resource allocation (scaling, scheduling, brokering), and resource adaptation (data reduction, granular scaling, batch execution, edge deployment).
Current research mainly focuses on dynamic resource allocation and scheduling according to energy efficiency optimization [24], [25].
[24] O. O. Ajibola, T. E. El-Gorashi, and J. M. Elmirghani, “Energy efficient placement of workloads in composable data center networks,” Journal of Lightwave Technology, vol. 39, no. 10, pp. 3037–3063, 2021.
[25] H. Valera, M. Dalmau, et al., “DRACeo: A smart simulator to deploy energy saving methods in microservices based networks,” in IEEE Int. Conference on Enabling Technologies: Infrastructure for Collaborative Enterprises, 2020, pp. 94–99.
Other attempts have proposed general principles and lack practical solutions [28]–[31].
[28] A. Nowak, T. Binz, et al., “Pattern-driven green adaptation of process-based applications and their runtime infrastructure,” Computing, vol. 94, no. 6, pp. 463–487, 2012.
[29] C. Cappiello, M. Fugini, et al., “Business process codesign for energy-aware adaptation,” in ICCP, IEEE, 2011, pp. 463–470.
[30] J. vom Brocke, R. T. Watson, et al., “Green Information Systems: Directives for the IS discipline,” Communications of the Assoc. for Information Systems, vol. 33, no. 1, p. 30, 2013.
[31] P. Loos, W. Nebel, et al., “Green it: A matter of business and information systems engineering?” Business & Information Systems Engineering, vol. 3, no. 4, pp. 245–252, 2011.
Microsoft Azure [32], Google Cloud Platform [33], and Amazon Web Service [34] are now providing a dashboard to report the energy consumption and CO2 emissions at the cloud service level. All these tools lack details and do not provide timely information.
Third parties tools have been developed to timely estimate applications’ energy usage and carbon emissions. The CodeCarbon initiative [35] estimates CO2 emissions of Machine Learning tasks in the geographical location and the energy mix of the country in which the application is deployed. Similarly, The Cloud Carbon Footprint Tool [36] estimates the energy consumption of cloud instances. Power is also one of the metrics considered by Brondolin and Santambrogio, providing closed-box monitoring for multi-component applications [37]. Some proposals aimed to estimate the energy efficiency of specific applications in embedded systems [38] but cannot be applied in complex cloud infrastructures. A virtual energy system exploited to optimize the carbon efficiency of applications is proposed by Souza, Bashir, et al. [39].
[35] K. Lottick, S. Susai, et al., “Energy usage reports: Environmental awareness as part of algorithmic accountability,” arXiv:1911.08354, 2019.
[36] Thoughtworks Inc., Cloud Carbon Footprint Tool, https://www.cloudcarbonfootprint.org, 2023.
[37] R. Brondolin and M. D. Santambrogio, “A black-box monitoring approach to measure microservices runtime performance,” ACM Transactions on Architecture and Code Optimization (TACO), vol. 17, no. 4, pp. 1–26, 2020.
@Brondolin.Santambrogio.2020.BlackboxMonitoringApproach
[38] T. Be´ziers la Fosse, M. Tisi, et al., “Annotating executable dsls with energy estimation formulas,” in Proc. of the 13th ACM SIGPLAN International Conference on Software Language Engineering, 2020, pp. 22–38.
[39] A. Souza, N. Bashir, et al., “Ecovisor: A virtual energy system for carbon-efficient applications,” arXiv preprint arXiv:2210.04951, 2022.
Cloud-native applications empower the design and execution of scalable, loosely coupled, resilient, manageable, and observable applications [8]. These applications generate complex workflows as a consequence of the microservice architectural style. Specific characteristics of these applications can be exploited to improve energy efficiency.
[8] D. Gannon, R. Barga, and N. Sundaresan, “Cloud-native applications,” IEEE Cloud Computing, vol. 4, no. 5, pp. 16–21, 2017.
Elasticity can be used to balance energy and performance [41]. Energydriven considerations in Mobile Cloud Computing can lead to microservices’ offloading [42]. An attempt to consider the workflow and the interdependencies between microservices of the same applications is presented by Saboor, Mahmood, et al. [43], where a ranking approach allocates microservices to containers according to their interactions.
[41] I. F. De Nardin and R. o. da Rosa Righi, “On revisiting energy and performance in microservices applications: A cloud elasticity-driven approach,” Parallel Computing, vol. 108, p. 102 858, 2021.
[42] A. Ali and M. M. Iqbal, “A cost and energy efficient task scheduling technique to offload microservices based applications in mobile cloud computing,” IEEE Access, vol. 10, pp. 46 633–46 651, 2022.
[43] A. Saboor, A. K. Mahmood, et al., “Enabling rank-based distribution of microservices among containers for green cloud computing environment,” Peer-to-Peer Networking and Applications, vol. 15, no. 1, pp. 77–91, 2022.
The design of adaptive applications, able to change their workflow according to the current workload and energy mix, is necessary to empower green applications from an application provider perspective.
The power-aware brownout strategy proposed Papadopoulos, Krzywda, et al. presented an approach to adapt the workflow execution by producing a response containing minimal components (mandatory part) while disabling additional components in case of limitations in power availability [44].
[44] A. Papadopoulos, J. Krzywda, et al., “Power-aware cloud brownout: Response time and power consumption control,” in 2017 IEEE 56th Annual Conference on Decision and Control (CDC), Dec. 2017, pp. 2686–2691. DOI: 10.1109/CDC.2017.8264049.
Gerostathopoulos, Raibulet, and Lago suggest the usage of decision maps to make sustainability-driven decisions [45]. Decision maps associate tactics and sustainability goals. For example, they use service scaling and something similar to brown out to adapt the application workflow from an economical and technical sustainability perspective.
[45] I. Gerostathopoulos, C. Raibulet, and P. Lago, “Expressing the adaptation intent as a sustainability goal,” in Proceedings of the ACM/IEEE 44th International Conference on Software Engineering: New Ideas and Emerging Results, ser. ICSE-NIER ’22, New York, NY, USA: Association for Computing Machinery, Oct. 17, 2022, pp. 36–40, ISBN: 978-1-4503-9224-2. DOI: 10 . 1145 / 3510455 . 3512776. [Online]. Available: https://dl.acm.org/doi/10.1145/3510455.3512776 (visited on 03/22/2023).
We opted to represent microservice choreography through Business Process Model and Notation (BPMN) fragments, exploiting a well-known process modeling notation to represent microservices interactions [46].
[46] P. Valderas, V. Torres, and V. Pelechano, “A microservice composition approach based on the choreography of bpmn fragments,” Information and Software Technology, vol. 127, p. 106 370, 2020.
The proposed approach considers three actors: (i) the application designer is made aware of the current sustainability of the application through a set of metrics and indicators and is in charge of setting sustainability targets and of re-designing the application adding sustain- ability features; (ii) the application developer is in charge of implementing the sustainability features included by the application designer according to the specific framework used for the application development and management; (iii) the infrastructure provider adapts the application deployment and scheduling according to the rules and characteristics added in the design and development phases and provides energy and carbon footprint data about the current application execution.
The SADP approach described in [10] identifies a set of features and makes them explicitly defined during the design process. However, these features need to be visible to the infrastructure provider. Thus, the features added at design time must be reflected in the implementation of the application components. This paper introduces a Sustainable Application Design Architecture (SADA) and focuses on the synergy between the design and the development phases.
Sustainable Application Design Process (SADP):
-
Sustainable Awareness: requirements and capabilities → assign correct amount of computational resources and best deployment location
-
Microservice Classification: optional or mandatory → application workflow can be adapted according to the current execution context or if there is a green energy sources shortage
-
Microservice Enrichment: multiple implementations with different functional and non-functional properties → adaptive workflow
The architecture is characterized by three main subsystems, each one responsible for one of the phases of the application management and addressed to one of the actors defined in Section III:
- Sustainable Application Design, addressed to the application designer;
- Web Service Development Framework, addressed to the application developer;
- Sustainability-Aware Deployment System, addressed to the infrastructure provider.
The Sustainable Application Design subsystem has to: (i) enable the (re)design of the application, including the features of the SADP; (ii) provide feedback on the current sustainability level of the application; (iii) enable to export the application model in a machine-readable format to ease the implementation of the defined characteristics.
We propose to embed the sustainability context embedded in the BPMN notation [48], a standard to model an organization’s internal processes and collaborations and orchestrations between different organizations. Following the approach adopted in [46], the application can be represented as a set of microservices orchestrated by a general process, defining their order of execution (workflow).
[48] OMG, “Business Process Model and Notation (BPMN), Version 2.0,” Object Management Group, Tech. Rep., 2011. [Online]. Available: http://www.omg.org/spec/BPMN/2.0.
The Business Process Modeler component implements the front-end for the application design using BPMN. It enables the application designer to load and edit an existing model or to create a new one. It also allows the enrichment of this model with the sustainability features introduced in Section III. Each task in the BPMN model represents a microservice of the application and is linked to its implementation by specifying the service identifier. This enables the alignment between the application representation and its actual implementation.
The Web Service Development Framework subsystem defines how to enrich the microservices composing the application with the metadata expressed in the design. It also enables the application designer and developer to exchange sustainability information.
The Carbon-Aware Deployment System is the connection point between the Infrastructure Provider, who is in charge of deploying the application, and the Application Designer and Developer, who designs the adaptive workflows.
We instantiated the web service development framework integration components into a DSL-based Apodini web service application framework. Apodini is a declarative Swift framework to express the interface, requirements, and functionalities of web services in a single internal DSL independent of any specific middleware, protocol, or Interface Description Language (IDL) [50], [51].
[50] P. Schmiedmayer, “Apodini: An internal domain specific language to design web services,” in Proc. of the 21st International Middleware Conference Doctoral Symposium, ser. Middleware’20 Doctoral Symposium, New York, NY, USA: ACM, 2020, pp. 47–49.
[51] P. Schmiedmayer, “Designing evolvable web services,” Ph.D. dissertation, Technische Universität München, 2022.
We demonstrate the implementation of the architectural components using a Flight Booking application shown in Figure 3). The application consists of five microservices. The Weather Information and the Rental Car Booking components are optional (their execution can be skipped if needed), while
Microservices of the Flight Booking application
for the Flight Search component, three versions have been defined: i) a normal version, collecting updated data from flight companies at each new request; ii) a low-power version using cached and possibly outdated information in the preliminary search phases to reduce energy waste; iii) a high-performance version, using a recommender system to improve the results presented to the customer and their order.
Example Online Boutique:
- two tasks have been labeled as optional: Advertisement and Product Recommendation
- two tasks have been complemented with alternative versions: a low-power version Product Catalog has been configured to show a limited set of products during the navigation, the Product Recommendation component recommends a reduced set of products using a simpler algorithm
At the current stage, it is impossible to quantify the benefits of the proposed approach from an environmental sustainability perspective. The actual reduction in energy and emissions depend on several factors, including the involvement of all the stakeholders. However, some preliminary tests have been executed to compare the emissions generated by the applications presented as examples under different execution modalities. In a best-effort approach given the described constraints, we compared the online Boutique application introduced in Section V-C execution of the out-of-the-box application with the execution of the same application with the optional and low-power version of its tasks simulating a workload of 100 users. The results show a reduction of 27% in computational resource demand.
📑 Annotations (imported on 2024-01-23#17:10:31)
However, the presented sustainable design can only affect the environmental impact of cloud-native applications if the synergy between all the stakeholders is enacted and appropriate actions are taken accordingly in their management at runtime.