Live data from Hacker News

Take a look at Traefik, even if you don't use containers

j6b72.de

61–70 of 266 posts

Re: Take a look at Traefik, even if you don't use containers

#61
post #27
post #6

Earlier quoted context omitted.

Caddy is at the same level as nginx/apache. It is able to do everything a web server is expected to (serving web sites, files and proxying services) plus handling LetsEncrypt automatically. It does not, afaik, do dynamic service discovery like traefik nor load balancing of TCP at the protocol layer, like e.g. haproxy. https://caddyserver.com/features

Caddy can absolutely do both of those things. - https://caddyserver.com/docs/modules/http.reverse_proxy.upst... - https://github.com/mholt/caddy-l4

We are long-time fans of Caddy, preferring it over traefik + nginx especially for our docker-compose flows.. though it's fair to distinguish 'can' vs 'easy to do'

E.g., we can imagine writing or using a plugin to figure out some upcoming fancy sticky session routing logic based on routes/content vs just the user IP, but there are easier and more 'with the grain' solutions than with what Caddy exposes today, afaict

(Agreed tho: The reverse proxy module, for more typical cases, is awesome and we have been enjoying for years!)

Re: Take a look at Traefik, even if you don't use containers

#63
post #62

In the future our company will migrate to k8s. It looks like it will be openshift, specifically. Do we need this in openshift or is there some "native" mechanism baked in?

You'll likely have an ingress controller provided with openshift, which tends to be more batteries included. There are quite a few options: https://kubernetes.io/docs/concepts/services-networking/ingr...

Re: Take a look at Traefik, even if you don't use containers

#64
post #40

The only problem I'm having with it is that it doesn't support unix domain socket[0], in a "cloud native" environment you rarely need it but if you are using single node this can be sweet. -- [0]: https://github.com/traefik/traefik/issues/4881

Could you say more about how a non-network socket would be beneficial? I'm guessing simpler code and lower resource usage, but I'm curious what you're interested in. And by "single node", do you mean one server / one user (even if the user is, say, a single API consumer or whatever), or something else?

Re: Take a look at Traefik, even if you don't use containers

#65
post #53
post #52

Traefik is pretty cool, but suffers from the same, terrible problem of Ansible: there is a lot of documentation, and a lot of words written, yet you can never find anything you need. I have used it since v1 and I routinely get lost in their docs, and get immensely frustrated. I have been using Caddy for smaller projects simply because its documentation is not as terrible (though not great by any stretch) Technical wr…

Funny you say that because we don’t have nearly any examples in the Caddy docs. We’re working on improving them later this year.

Examples are good in docs. But documentation that's only made of examples and tutorials... not so much.

Thanks for Caddy btw. Neat little tool.

Re: Take a look at Traefik, even if you don't use containers

#66
post #52

Traefik is pretty cool, but suffers from the same, terrible problem of Ansible: there is a lot of documentation, and a lot of words written, yet you can never find anything you need. I have used it since v1 and I routinely get lost in their docs, and get immensely frustrated. I have been using Caddy for smaller projects simply because its documentation is not as terrible (though not great by any stretch) Technical wr…

My latest gripe in this category - opentelemetry. Thousands of pages. Very little about actually achieving basic common workflows.

Re: Take a look at Traefik, even if you don't use containers

#67
post #52

Traefik is pretty cool, but suffers from the same, terrible problem of Ansible: there is a lot of documentation, and a lot of words written, yet you can never find anything you need. I have used it since v1 and I routinely get lost in their docs, and get immensely frustrated. I have been using Caddy for smaller projects simply because its documentation is not as terrible (though not great by any stretch) Technical wr…

Do not agree WRT ansible, been using it for well over 5 years and usually a google search points me right at the correct part of the documentation to answer my question. Ansible, the tool itself, can be a bit obtuse, largely IMHO because of the YAML source language, so some concepts are hard to translate into the tool, but the documentation has never bothered me. As far as "a lot of words written, can't find what you…

Alright, please link me to an exhaustive list of Jinja filters supported by Ansible out of the box. I'll wait.

What you are given is https://docs.ansible.com/ansible/latest/playbook_guide/playb... and you need basically to read/scan each example until you find what you need [1]. Do you call that good, especially when these are basically the only way of doing anything a little complex? That's a sure way of killing my flow and productivity in its tracks. I have been through this page in anger a dozen times, and I still have no idea what Ansible filters can or cannot do.

Also, using Google to find stuff is "cheating". The goal of documentation is to be able to use it as reference; if you need an external tool to find anything in it, that defeats its purpose a bit. When people wrote documentation books, they had to make sure it's usable, legible and efficient. These days apparently that's become lost art.

1: these examples are not even exhaustive, because they don't list all the builtin Jinja filters; chances are that what you need isn't listed on that page, but you should instead refer to https://tedboy.github.io/jinja2/templ14.html

Re: Take a look at Traefik, even if you don't use containers

#68
post #52

Traefik is pretty cool, but suffers from the same, terrible problem of Ansible: there is a lot of documentation, and a lot of words written, yet you can never find anything you need. I have used it since v1 and I routinely get lost in their docs, and get immensely frustrated. I have been using Caddy for smaller projects simply because its documentation is not as terrible (though not great by any stretch) Technical wr…

I usually feed all the documentation to an llm and ask the question to the llm that fetches the info with rag. For example:

> how do i configure Traefik to proxy traffic to two backend services?

Configuring Traefik to proxy traffic to multiple backend services is a common use case. You can achieve this by defining multiple entry points and routers in Traefik's configuration, each pointing to a different backend service. Here's a basic example of how you can configure Traefik to proxy traffic to two backend services:

  yaml
  
  # traefik.yaml
  
  # Enable API and Dashboard
  api:
    dashboard: true
  
  # Define entry points
  entryPoints:
    web:
      address: ":80"
    app1:
      address: ":8081"
    app2:
      address: ":8082"
[...more stuff...]

Re: Take a look at Traefik, even if you don't use containers

#69
post #67

Earlier quoted context omitted.

Do not agree WRT ansible, been using it for well over 5 years and usually a google search points me right at the correct part of the documentation to answer my question. Ansible, the tool itself, can be a bit obtuse, largely IMHO because of the YAML source language, so some concepts are hard to translate into the tool, but the documentation has never bothered me. As far as "a lot of words written, can't find what you…

Alright, please link me to an exhaustive list of Jinja filters supported by Ansible out of the box. I'll wait. What you are given is https://docs.ansible.com/ansible/latest/playbook_guide/playb... and you need basically to read/scan each example until you find what you need [1]. Do you call that good , especially when these are basically the only way of doing anything a little complex? That's a sure way of killing my…

I like that it forces users to read the docs to find the functionality. Users don't read the docs, and then they wander around the internet looking for a random blog post with a snippet for one problem, and they don't ever really learn how to use the program.

Users are a bit like high school students just skimming books for an answer to fill in on a test. They need to be forced to learn.

Post reply on HN