These are chat archives for gin-gonic/gin

2nd
Jun 2015
Jonathan Camp
@kung-foo
Jun 02 2015 10:40
Is there a way to remove routes or routergroups at runtime?
Manu MA
@manucorporat
Jun 02 2015 13:29
@kung-foo nop, there is no way to do that, why do you want to do that?
Manu MA
@manucorporat
Jun 02 2015 13:35
There are many reasons at different levels:
  • Gin uses a radix tree for the router, it is not trivial to remove a route from it. A lot of implementation would be needed.
  • If the router configuration could change at any point, it would not longer be lockless. We should protect it with mutexes.
  • It would be slower when running in single thread.
  • The vertical scaling (using several CPUs) would be horrible.
Jonathan Camp
@kung-foo
Jun 02 2015 14:57
yeah, that's what I figured. I am building a dynamic reverse proxy with gin as the frontend and was hoping to update the routing table in real time.
Ryan Brooks
@ryanbyyc
Jun 02 2015 15:10
That’s not a bad idea @kung-foo - I could see the use case for that.
Jonathan Camp
@kung-foo
Jun 02 2015 18:19
@sirstompsalot github.com/mailgun/vulcand/ is doing something similar but backed by etcd. I am looking for something a bit lighter weight.