bcc-code / developer.bcc.no

BCC Developer Portal with technical documentation and other resources for developers
https://developer.bcc.no/
5 stars 5 forks source link

[ADR] Kubernetes+Dapr or Cloud Run #8

Open piotrczyz opened 2 years ago

piotrczyz commented 2 years ago

Context

As developers, we would like to simplify our daily work an instead of focusing on different technical aspects related to networking, infrastructure, etc, we aim to use our efforts to bring values to the users. Hence our infrastructure needs to be elastic, flexible and require minimal effort to roll out a new service.

Dapr is definitely a great player in microservice architecture and worth considerations.

Requirements:

Decision

Azure Container Apps with Dapr enabled

As our long-term strategy is to go Azure then Azure Container Apps seems the best option. But we agreed to wait until it comes out of Preview version. In mean time, we can still use our application running on Cloud Run and hide them back a global Load balancer, Azure Front Doors #34.

We do not decide to go for managed Kubernetes as it might require more DevOps work. Possibly, we can consider Terraform in the future but right now we will start slowly as we're investigating a concept of landing zones.

Consequences

Google seems to be more developer-friendly but we see the advantages of using Azure. But both platforms are quite similar so it should be ok for devs as long as they will be able to focus purely on solving business use cases.

Alternatives

Dapr with serverless Azure Container Apps

As for now, Azure Container Apps are in Preview version and we want use it for production. There is quite easy way to create and setup a new service using Container Apps with minimal effort. In the background Azure Container Apps is running on fully manage Kubernetes. As a developer you don't need to take care of anything.

Kubernetes

Kubernetes can be hosted anywhere as a network for our services and Dapr (check the consideration of using Dapr). It could be quite a valid option in the future if we would like to (from political aspects) move our applications to another Cloud provider or to host it on our servers.

Cloud Run

We already have a good experience with Cloud Run and we didn't have any performance problems. To setup a new service would be just to configure a pipeline. Everything else is taken care by Google.

Application Insights for observability

As a part of spinning up a new application, we always include connection to Azure Application Insights.

piotrczyz commented 2 years ago

Maybe all we need is an API Gateway with Global Load balancer and we don't really need Dapr. It gives possibility for developers to use any language they want. If we just keep good practices then maybe it doesn't matter what we use. What do you think @rvanoord @u12206050 ?

rvanoord commented 2 years ago

Maybe all we need is an API Gateway with Global Load balancer and we don't really need Dapr. It gives possibility for developers to use any language they want. If we just keep good practices then maybe it doesn't matter what we use. What do you think @rvanoord @u12206050 ?

I'm beginning to think along the same lines @piotrczyz. What we need is a way of aligning event communication. Perhaps CloudEvents are the answer here?

piotrczyz commented 2 years ago

I've opened a new thread here: https://github.com/bcc-code/bcc-code.github.io/issues/41 @rvanoord

kkuepper commented 2 years ago

Maybe all we need is an API Gateway with Global Load balancer and we don't really need Dapr. It gives possibility for developers to use any language they want. If we just keep good practices then maybe it doesn't matter what we use. What do you think @rvanoord @u12206050 ?

Oh. I'm not sure if I agree with that.