Coder Social home page Coder Social logo

Transparent urlprefix? about fabio HOT 4 CLOSED

fabiolb avatar fabiolb commented on September 18, 2024
Transparent urlprefix?

from fabio.

Comments (4)

magiconair avatar magiconair commented on September 18, 2024

Right now I don't have plans to support URL rewriting since I would also have to support rewriting URLs in responses and I'm not convinced that URL rewriting is necessary in general. Services should announce the routes they serve and have handlers to service them. Fabio is fast even with lots of routes per host to the number of routes don't matter.

You probably don't have two services responding to /api directly but to some sub path like /api/foo and /api/bar.

Having two different services announce the same route (or parts thereof) allows you to migrate from one implementatin to another. Traffic shaping allows you to do this gradually. This is how we migrate Java services to Go or split up services which have become too large into smaller ones.

from fabio.

magiconair avatar magiconair commented on September 18, 2024

Can you explain how many paths you would have to register and for how many services? I'm also interested in why you have an /OrderService prefix that is not used by the services. What is the use case for that?

To give you an idea: we generally register one or two routes per service.

from fabio.

magiconair avatar magiconair commented on September 18, 2024

I have decided not to support this since fabio favors convention over configuration. If a service handles traffic on /foo/bar then it should announce that route and have a handler for it. By expecting the router to strip part of the URL the service behaves differently when run with or without the router which makes the router an essential part of the configuration. That is against the idea of fabio which is supposed to be stateless and zero-conf.

from fabio.

rokka-n avatar rokka-n commented on September 18, 2024

This makes a lot of sense, app should understand the routes it announces.

Btw, where did the docker-compose go? I remember there was a demo with compose.

from fabio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.