Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Defining scalable deployment nodes #38

Closed
snothaas opened this issue Feb 24, 2021 · 3 comments
Closed

Defining scalable deployment nodes #38

snothaas opened this issue Feb 24, 2021 · 3 comments

Comments

@snothaas
Copy link

I am currently in the process of modeling a backend system using the structurizr dsl. One part includes defining our different deployment environment which also differ in regards of scaling the services. A lot of our services are not static but instead have autoscaling implemented. However, I haven't found a good way to model this in the dsl.

Example how I modeled one of our services in a deployment environment:

model {
    deploymentEnvironment production {
        deploymentNode "My scalable service" "This service scales based on load" "Kubernetes Deployment" "2" {
            containerInstance myJavaApplication
            containerInstance istio
        }
    }
}

Intuitively, I wanted to assign a value range, e.g. "2-10" to the last parameter of the deploymentNode field. However, structurizr-cli errors telling me that parameter only accepts numbers as a value.

Are there any suitable options to express the autoscaling of a service in the dsl? if not, would this be a viable feature to support?

@simonbrowndotje
Copy link
Contributor

I think having an "autoscaling" deployment node (like you see in AWS architecture diagrams) is actually a good approach. It's in the AWS DSL example too ... you could include the 2-10 in the name of the autoscaling group, or whatever resides inside.

Screenshot 2021-02-24 at 18 12 17

@snothaas
Copy link
Author

snothaas commented Mar 1, 2021

That looks good. Applied it to our architecture and it works out well. Thanks for pointing out the example. Didn't see or missed that before. It helped me to get a better understanding of how specific concepts should be reflected in the DSL.

Slightly off-topic questions:

  • How is the description of a Deployment Node supposed to be used? I would assume that this might be a good place to put additional details such as the number of pods or parameters of the autoscaler, e.g. scales on 80% CPU load. However, using structurizr-cli and plantuml, or the structurizr web interface, the descriptions are not rendered. Is that intended?
  • Themes do not seem to work entirely when using plantuml. Icons as well as shapes are not rendered but the coloring of boxes changes accordingly. Are themes not entirely supported with plantuml, yet?

@simonbrowndotje
Copy link
Contributor

Thanks, you're welcome.

  • Deployment node descriptions: the Structurizr web renderer will include them in the tooltips, and I have an issue to look into how to render them on the diagram. None of the other renderers support deployment node descriptions AFAIK.
  • Themes and PlantUML: Feel free to raise an issue on the Java extensions project with any PlantUML rendering examples that you think could be improved.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants