In the takeaways section, the author blames the issue on merging together complicated software systems. While absolutely true, this isn't specific to k8s at all. To specifically call out k8s as the reason for latency spiking is misleading.
In the takeaways section, the author blames the issue on merging together complicated software systems. While absolutely true, this isn't specific to k8s at all. To specifically call out k8s as the reason for latency spiking is misleading.
I also get the sense that that team has a better than average allocation of resources. Some teams I've been on, this type of problem would be the responsibility of one person within an afternoon, or with impatient product people and managers checking for status after that.
Why?
Because too many engineers I've worked with would bump into this situation and this would be their answer. They wouldn't take the time to debug the situation deeply enough and they'd blame k8s, or blame the network, or blame...
In my experience, the most common issues with complex distributed systems are much more likely to be due to misconfiguration because of a limited understanding of the systems involved than such issues are to be caused by core, underlying bugs. And I believe that's why some engineers shy away from otherwise valuable frameworks and platforms: they have a natural and understandable bias to solve problems via engineering (writing code) than via messing with configuration parameters.
I don't know. k8s is pretty complicated. How many small/medium apps need more than this nginx/Terraform/Docker example? This would be a lot more difficult to set up in k8s (pods, ingress, etc.)
Terraform:
resource "docker_container" "app" { count = 2
name = "app-${count.index}"
hostname = "app-${count.index}"
image = "app:${var.app_version}"
restart = "always"
env = [
...
]
ports {
internal = parseint("${var.app_port}", 10) + count.index
external = parseint("${var.app_port}", 10) + count.index
}
networks_advanced {
name = "${docker_network.private_network.name}"
aliases = ["app-${count.index}"]
}
depends_on = [
...
]
}Nginx:
http { ...
upstream app {
server app-0:3000;
server app-1:3001;
}
server {
listen 80;
root /usr/share/nginx/html;
location ~* ^/api/ {
rewrite ^/api/(.*) /$1 break;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_pass http://app;
}
}
}Is there some epidemic of developers setting up complex, multi-node Kubernetes clusters just to run a small web app ?
Better (more accurate) title would have been: "Merging complicated software systems made my latency 10x higher"