8 ms·
Nginx Modern Reference Architectures
- AceJohnny2 5y agoTangential: the readme mentions Pulumi [1], an Infratructure-as-Code tool I hadn't heard of before. As an IaC tool, can anyone speak of how it fits in the landscape compared to Chef, Puppet, Ansible, SaltStack and, oh, Terraform? [1] https://www.pulumi.com https://www.pulumi.com
- xfalcox 5y agoPulumi is Terraform for people who hate HCL shortcomings.
- threeseed 5y agoPulumi is Terraform for people who hate Terraform shortcomings. Not to nitpick but there is so much more that is wrong with Terraform than HCL e.g. lack of dynamic providers.
- Spivak 5y agoThe Terraform CDK is Terraform for people who hate HCL. I really can't fathom why people lock themselves into HCL when you could be using Python.
- markbnj 5y agoIt's a polyglot world for IAC, and even standing before both tools in their current state I can imagine other axes of consideration that might rank as highly as the specific characteristics of the language. In our case we adopted TF several years back and being able to use a different language probably isn't going to be enough benefit to justify migrating all our things. I think in many cases people will adopt the tool that gives them the most confidence that it will do what they need, and deal with whatever language it uses.
- nikolay 5y agoCDKTF is very painful! I am using it with Go on a pilot and HCL feels so much comfy and easier to read!
- Spivak 5y agoI can agree that for basic stuff HCL cuts a little more to the core because you don’t have the programming language boilerplate around it but to me it reads the same except things like conditional and loops are a lot more natural. Just being able to DRY your code and write tests is already worth the cost of admission for me.
- nikolay 5y agoIt can't be DRY and modular with CDKTF though - you can't really put components into Go modules, for example, so, you still get a monolithic codebase unless you use Go as glue code and put all the IaC in Terraform modules. I think Pulumi is better in that regard and those who don't want to use a programming language can use the new Pulumi YAML. I do use CDKTF where Terraform lacks: dynamic providers and dynamic resource names. For anything else, modular Terraform code does that and does it better, and it's more readable and works with the existing Terraform ecosystem of Terraform Cloud, linters, security scanners, drift detectors, etc.
- de6u99er 5y agoThere's also an interesting open source project called NAML. As I understand it, it can be a replacement for Helm. https://github.com/kris-nova/naml https://github.com/kris-nova/naml
- KronisLV 5y agoCurious whether anyone else has run into the problem where Nginx fails to work and crashes the entire instance because a single app that it's supposed to reverse proxy doesn't resolve: nginx: [emerg] host not found in upstream "my-app" In my eyes, that's a massive pain when you're running something like Docker Swarm with container health checks that don't route traffic to dynamically added internal names before the actual health checks for the containers have passed successfully. This probably isn't specific just for Docker Compose but also other solutions that handle networking similarly. I wrote more about it on my blog: https://blog.kronis.dev/everything%20is%20broken/nginx-configuration-is-broken https://blog.kronis.dev/everything%20is%20broken/nginx-confi... The sad thing is that using variables for that proxy_pass URL doesn't work either, when you want to use "proxy_redirect default", without which some applications that you're hosting tend to fail due to weird redirects: nginx: [emerg] "proxy_redirect default" cannot be used with "proxy_pass" directive with variables Alas, I'm in the weird spot where I cannot use Nginx for certain deployments, say, proxying 10-20 apps on my server but wanting most of them to keep working when one fails, without resorting to something like Kubernetes for managing the ingress due to some pretty tight resource limitations (even with stuff like K3s). In comparison, Caddy is a little bit more usable, but also not quite as battle tested. Actually, Apache2/httpd might also be a viable alternative due to mod_md adding support for Let's Encrypt built in (like Caddy, unlike Nginx which needs certbot), if not for the performance. Then again, the code that I write is the bottleneck more often than the actual web server, except for cases where one might use mod_php instead of fpm (though if you need to work with PHP and Apache and can afford the little extra work of configuring fpm, it's not too hard to fix either).
- nikivi 5y agoI am curious why I should consider using nginx when Caddy (https://caddyserver.com https://caddyserver.com) exists. It seems to have more activity behind it.
- qbasic_forever 5y agoIn the context of kubernetes ingress caddy isn't really there yet, at least compared to nginx (which has two major k8s ingress implementations, one maintained by the core k8s devs themselves).
- francislavoie 5y agoThat is true, unfortunately. We, the core maintainers, don't use k8s ourselves, so we need to defer to the community for help. See https://github.com/caddyserver/ingress https://github.com/caddyserver/ingress
- qbasic_forever 5y agoYeah the whole k8s ingress world is a moving target that has changed substantially even in the last year or two. I don't blame you for not spending a ton of time on it. Caddy is still an awesome option to run inside a pod that needs to have a simple static file server, do some reverse proxying to services in the pod, etc.
- maxloh 5y agoCandy is written in Go (a garbage-collected language), which in theory slower than C (the language Nginx is written in).
- heurisko 5y agoWhen I evaluated Caddy it was missing some features, such as rate limiting. But I think Caddy is a fine server as well.
- francislavoie 5y ago