hyperioxx / frontman

Frontman is an open-source API gateway written in Go that allows you to manage your microservices and expose them as a single API endpoint. It acts as a reverse proxy and handles requests from clients, routing them to the appropriate backend service.
https://frontman-labs.github.io/frontman/
GNU General Public License v3.0
5 stars 0 forks source link

Implement Trie-based Routing for Frontman #63

Closed hyperioxx closed 1 year ago

hyperioxx commented 1 year ago

Currently, Frontman uses a linear search to find the appropriate backend service for an incoming request. This approach can become slow and inefficient as the number of backend services and routes increases. To improve the performance of Frontman, we should implement trie-based routing, which will allow for faster lookup times and more efficient routing.

Trie-based routing works by building a tree structure where each node represents a segment of the URL path. Each node can have multiple children representing the possible next segments of the path. This allows for efficient matching of the incoming request to the correct backend service.

Implementing trie-based routing will be a significant improvement to Frontman's routing capabilities and will allow for better scaling of the system.