Skip to content

Rename Endpoint, Backend #128

Closed
Closed

Description

@Kahbazi

Since Endpoint is already a concept in ASP.NET and right now Routes (from config) are being mapped to an Endpoint (ASP.NET) and Endpoints (from config) are referred to backend servers.

I suggest renaming Endpoint to Server or Resource and renaming Route to Endpoint.

So this

"ReverseProxy": {
  "Backends": {
    "backend1": {
      "Endpoints": {
        "Green": {
          "Address": "https://localhost:10001/"
        }
      }
    }
  },
  "Routes": [
    {
      "RouteId": "backend1/route1",
      "BackendId": "backend1",
      "Match": {
        "Methods": [ "GET", "POST" ],
        "Host": "localhost",
        "Path": "/{**catchall}"
      }
    }
  ]
}

would change to

"ReverseProxy": {
  "Backends": {
    "backend1": {
      "Servers": {
        "Green": {
          "Address": "https://localhost:10001/"
        }
      }
    }
  },
  "Endpoints": [
    {
      "EndpointId": "backend1/route1",
      "BackendId": "backend1",
      "Match": {
        "Methods": [ "GET", "POST" ],
        "Host": "localhost",
        "Path": "/{**catchall}"
      }
    }
  ]
}

Activity

  1. added
    Type: Idea
    on Apr 29, 2020
  2. Tratcher commented on Apr 30, 2020

    @Tratcher
    Member

    Yeah, the terminology could be improved, many of these terms are used in too many different contexts.

    That said, endpoints is already an overloaded term (used by kestrel, routing, and the proxy). At least routes are a unique term. I don't see renaming routes to endpoints as an improvement.

    I would like to rename backend endpoints to something to limit the overloading. Servers is also an overloaded term, we already have a server in the app at the front end. Destination(s)? Backend(s) could also work if we found a better group name for what we currently call backends (e.g. a group of endpoints).

  3. davidni commented on Apr 30, 2020

    @davidni
    Contributor

    Comparing terminology with other proxies may help:

    Proxy YARP Endpoint YARP Backend YARP Route
    Envoy host cluster route
    Traefik v2 server service router
    HAProxy server backend use_backend with predicate applied to a listener
    nginx upstream.server upstream server, location blocks
    Ocelot ReRoute.DownstreamHostAndPorts -- ReRoute

    Updated on 5/4: Added HAProxy, nginx.

  4. guibirow commented on May 2, 2020

    @guibirow

    I think nginx and haproxy terminology should also be taken into account, given they are most used and popular proxies and many people have prior experience with these for many years. Envoy and Traffic just became popular into kubernetes ecosystem, so that t will make easier for people coming from outside k8s to grasp.

    Regarding the name change from route to endpoint, I honestly prefer route, given endpoint can be confusing as inbound endpoint or outbound endpoint.

  5. davidni commented on May 4, 2020

    @davidni
    Contributor

    @guibirow added based on quick reading of docs (linked to in the table), please advise if anything seems inaccurate.

  6. guibirow commented on May 4, 2020

    @guibirow

    The server in NGINX can be misleading, given it is used to define any server, either upstream or downstream, like shownhere and here. Probably the right terminology should be upstream.server, like you did for ocelot.

  7. guibirow commented on May 4, 2020

    @guibirow

    NGINX terminology: https://www.nginx.com/resources/wiki/start/topics/examples/loadbalanceexample/

    http {                       // Same as Kestrel
    
      upstream myproject {       // same as backend
        server 127.0.0.1:8000;   // same as endpoint
        server 127.0.0.1:8001;
      }
    
      server {             // this concept does not exist here, I've suggested on #134 
        listen 80;
        server_name www.domain.com;
        location / {       //same as route
          proxy_pass http://myproject;
        }
      }
    }
    
  8. Tratcher commented on May 4, 2020

    @Tratcher
    Member

    From the above data route seems like a solid choice.

    For backend there does not seem to be consistent terms and the only alternative that seems more descriptive is cluster since it's explicitly a group of resources.

    While server does seem to be common to describe backend resources, it's still overloaded and conflicts with the inbound server. server might still be better than endpoint here since endpoint also has internal conflicts with endpoint routing and Kestrel's inbound endpoints.

  9. davidni commented on May 4, 2020

    @davidni
    Contributor

    Have we considered BackendServer to replace what we currently call Endpoint? A bit more verbose, but also less ambiguous than either Server or Endpoint.

  10. Tratcher commented on May 5, 2020

    @Tratcher
    Member

    Team discussion proposals:
    Route -> Route
    Backend -> Cluster
    Endpoint -> Destination

    "ReverseProxy": {
      "Clusters": {
        "cluster1": {
          "Destinations": {
            "Destination1": {
              "Address": "https://localhost:10001/"
            },
            "Destination2": {
              "Address": "https://localhost:10002/"
            }
          }
        }
      },
      "Routes": [
        {
          "RouteId": "backend1/route1",
          "ClusterId": "cluster1",
          "Match": {
            "Methods": [ "GET", "POST" ],
            "Host": "localhost",
            "Path": "/{**catchall}"
          }
        }
      ]
    }
    

    @davidni @Kahbazi how's that look?

  11. davidni commented on May 5, 2020

    @davidni
    Contributor

    +1 for Route, Destination. But I greatly dislike Cluster due to conflicts with well established terminology for the compute abstraction: Service Fabric Clusters are a top level Azure resource. AKS defines itself in one sentence using the terms (...) Kubernetes cluster in Azure.

    What's wrong with Backend? The terms Frontend and Backend are pretty self explanatory and common in proxies.

  12. self-assigned this
    on May 5, 2020
  13. added this to the 1.0.0-preview1 milestone on May 5, 2020
  14. Tratcher commented on May 5, 2020

    @Tratcher
    Member

    The preference for cluster over backend was about clarifying it represents a group of resources rather than an individual resource. None of the other terms from the other proxies communicate that. Other suggestions? Or is that not a distinction that needs to be made in the name?

  15. Tratcher commented on May 7, 2020

    @Tratcher
    Member

    I decided to write this out narratively to see if it made more sense.

    You select a Route and follow it through a ________ to one of many Destinations.

    • Backend
    • Cluster
    • Neighborhood
    • Zone
    • Domain
    • Warren
  16. analogrelay commented on May 7, 2020

    @analogrelay
    Contributor
    • Warren

    Rathole 😆

    I still like Cluster 😄. But I'm mostly going on subjectivity there. Given the change to "Destinations", I can be quite happy with Backend.

  17. Tratcher commented on May 11, 2020

    @Tratcher
    Member

    Endpoint was renamed to Destination in #150. Now we just need to decide what to do about Backend.

    With how much churn renaming Endpoints caused, and the lack of agreement around a good name for Backends, I'm inclined not to change it.

  18. davidni commented on May 11, 2020

    @davidni
    Contributor

    I am changing my stance from greatly dislike to just dislike the name cluster. I still think it would create unnecessary confusion due other meanings of cluster, but I reckon the confusion would be trivial to address through docs, and hence not such a big deal.

  19. changed the title [-]Rename Endpoint to Server or Resource[/-] [+]Rename Endpoint, Backend[/+] on Jun 9, 2020
  20. removed their assignment
    on Jun 9, 2020
  21. ghost closed this as completedin #251on Jun 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type: Idea

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions