-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c5b0146
commit 6adb219
Showing
9 changed files
with
55 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
--- | ||
title: Azure Blob Storage | ||
--- | ||
|
||
# What is Azure Blob Storage? | ||
|
||
> ... | ||
# Further Resources | ||
- ... | ||
|
||
- ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
--- | ||
title: Azure Container Apps | ||
--- | ||
|
||
# What are Azure Container Apps? | ||
|
||
> ... | ||
# Further Resources | ||
- ... | ||
|
||
- ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,46 @@ | ||
--- | ||
title: Azure Cost Efficiency | ||
--- | ||
|
||
# Virtual Machines | ||
|
||
- Ensure that the storage attached to a VM has a sensible size and tier, as especially premium storage can become very expensive. Use small disks and standard storage for VMs where storage is not critical. | ||
- ... | ||
|
||
# Kubernetes | ||
|
||
- Use ARM-based virtual machines for node pools if the image architecture of the applications allows for it | ||
- Enable ephemeral storage for virtual machines, as having attached storage is very expensive and unnecessary in the majority of cases (as storage is handled through Azure Storage anyways) | ||
- ... | ||
|
||
# Log Analytics | ||
|
||
- Log analytics can become very expensive, especially when logs from, e.g., Kubernetes are ingested, as there can be hundreds of containers that do not even belong to own applications. Restrict the data that is logged to log analytics on the source services (if possible) or define a cap for logging if retention is not critical. | ||
- ... | ||
|
||
# Functions | ||
|
||
- Use the [consumption plan](https://learn.microsoft.com/en-us/azure/azure-functions/consumption-plan) for real usage-based pricing. However, this is only possible if features restricted to the [premium plan](https://learn.microsoft.com/en-us/azure/azure-functions/functions-premium-plan) are not required (e.g., virtual network integration is not required and cold starts can be tolerated). The premium plan always has a minimum of one running instance (even if the application is unused), while the consumption plan causes no cost if the application is not in use. | ||
- ... | ||
|
||
# Container Apps | ||
|
||
- Define a HTTP scaling rule that enables scale-to-zero (if possible). Otherwise, container apps become more expensive than containers/apps hosted with other approaches. | ||
- ... | ||
|
||
# Static Web Apps | ||
|
||
- For simple applications and also less complex [[next-js]] applications, use Azure Static Web Apps, as they offer the cheapest way of hosting web applications. | ||
- ... | ||
|
||
# Bastion | ||
|
||
Recommendation: Instead of Azure Bastion, use a self-made virtual machine ("Jumbox") within the virtual network that can be turned off/on when necessary (and only causes storage cost when turned off) -> Azure Bastion is very expensive, can only be deleted and not stopped, and only allows SSH access to virtual machines, but does not allow for access to databases. | ||
|
||
# Storage Accounts | ||
|
||
- ... | ||
|
||
# App Service | ||
Recommendation: Evaluate another dynamically scalable container-based hosting service, as app service is very expensive in terms of resources (e.g., container apps or container instances). | ||
|
||
Recommendation: Evaluate another dynamically scalable container-based hosting service, as app service is very expensive in terms of resources (e.g., container apps or container instances). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,30 @@ | ||
--- | ||
title: Azure Functions | ||
--- | ||
|
||
# What are Azure Functions? | ||
|
||
> Azure Functions is a serverless compute service provided by Microsoft Azure that allows developers to run event-triggered code without the need to provision or manage infrastructure [1](https://www.serverless360.com/azure-functions). This service is designed to execute a piece of code or script in response to a variety of events, making it ideal for tasks that need to be performed quickly, often within seconds or less [2](https://www.azureguru.org/some-key-features-of-azure-functions/). | ||
> | ||
> | ||
> Azure Functions supports multiple programming languages, including C#, F#, JavaScript, Java, PowerShell, Python, and TypeScript, among others [1](https://www.serverless360.com/azure-functions). The service is designed to be scalable, automatically allocating necessary resources when the demand for code execution increases, and disposing of any leftover resources when the demand decreases [3](https://revdebug.com/blog/azure-functions-overview-use-cases/). | ||
> | ||
> Azure Functions can be triggered by a variety of events, such as HTTP requests, timers, or messages from other Azure services [1](https://www.serverless360.com/azure-functions). They are commonly used for tasks like reminders and notifications, scheduled tasks, file processing, and data stream processing [3](https://revdebug.com/blog/azure-functions-overview-use-cases/). They can also be used to build web APIs, respond to database changes, process IoT streams, manage message queues, and more [9](https://learn.microsoft.com/en-us/azure/azure-functions/). | ||
> | ||
> | ||
> Azure Functions can be triggered by a variety of events, such as HTTP requests, timers, or messages from other Azure services [1](https://www.serverless360.com/azure-functions). They are commonly used for tasks like reminders and notifications, scheduled tasks, file processing, and data stream processing [3](https://revdebug.com/blog/azure-functions-overview-use-cases/). They can also be used to build web APIs, respond to database changes, process IoT streams, manage message queues, and more [9](https://learn.microsoft.com/en-us/azure/azure-functions/). | ||
> | ||
> Azure Functions offers several hosting options, including the Consumption plan where you only pay for execution time, and the Premium plan which provides always warm instances for faster response times [4](https://learn.microsoft.com/en-us/azure/azure-functions/functions-overview). The service integrates with various Azure services and offers a high level of hardware abstraction, allowing developers to focus on core business logic [7](https://azure.microsoft.com/en-us/products/functions). | ||
> | ||
> | ||
> Source: perplexity.ai with the prompt "what are azure functions?" | ||
# Examples | ||
|
||
- KlickerUZH: Azure Function with an HTTP trigger that adds a message to [[azure-service-bus]] (queue) for asynchronous further processing (in [[typescript]]) -> https://github.com/uzh-bf/klicker-uzh/tree/v3/apps/func-incoming-responses | ||
- KlickerUZH: Azure Function with an [[azure-service-bus]] trigger that processes the message and updates state in a Redis cache (in [[typescript]]) -> https://github.com/uzh-bf/klicker-uzh/tree/v3/apps/func-response-processor | ||
- KlickerUZH: Azure Function with an [[azure-service-bus]] trigger that reads from MongoDB and stores a new file on [[azure-blob-storage]] (in [[typescript]]) -> https://github.com/uzh-bf/klicker-uzh/tree/v3/apps/func-migration-v2-export | ||
- KlickerUZH: Azure Function with an [[azure-blob-storage]] trigger that processes a JSON blob and updates data in PostgreSQL (in [[typescript]]) -> https://github.com/uzh-bf/klicker-uzh/tree/v3/apps/func-migration-v3-import | ||
- KlickerUZH: [[github-actions]] workflow for automated deployment of an Azure Function -> https://github.com/uzh-bf/klicker-uzh/blob/v3/.github/workflows/v3_klickeruzhprod-responses.yml | ||
|
||
# Further Resources | ||
|
||
- Azure Functions Documentation: https://learn.microsoft.com/en-us/azure/azure-functions/ | ||
- Azure Functions Best Practice: https://learn.microsoft.com/en-us/azure/azure-functions/functions-best-practices | ||
- Integrating Azure Functions with Container Apps: https://learn.microsoft.com/en-us/azure/azure-functions/functions-deploy-container-apps?tabs=acr%2Cbash&pivots=programming-language-typescript | ||
- Github Actions for Azure Functions Deployment: https://learn.microsoft.com/en-us/azure/azure-functions/functions-how-to-github-actions?tabs=windows%252Cdotnet | ||
- Github Actions for Azure Functions Deployment: https://learn.microsoft.com/en-us/azure/azure-functions/functions-how-to-github-actions?tabs=windows%252Cdotnet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
--- | ||
title: Azure Service Bus | ||
--- | ||
|
||
# What is Azure Service Bus? | ||
|
||
> ... | ||
# Further Resources | ||
- ... | ||
|
||
- ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters