Region aware routing (#135)

* Region aware routing

* update config, fix spacing on commented out lines
This commit is contained in:
David Zhao
2021-10-06 21:40:04 -07:00
committed by GitHub
parent b0eca12ee8
commit c745f0a318
22 changed files with 406 additions and 113 deletions
+2 -1
View File
@@ -5,6 +5,7 @@ import (
"time"
"github.com/go-redis/redis/v8"
"github.com/livekit/livekit-server/pkg/routing/selector"
"github.com/livekit/protocol/logger"
livekit "github.com/livekit/protocol/proto"
"github.com/livekit/protocol/utils"
@@ -64,7 +65,7 @@ func (r *RedisRouter) RemoveDeadNodes() error {
return err
}
for _, n := range nodes {
if !IsAvailable(n) {
if !selector.IsAvailable(n) {
if err := r.rc.HDel(context.Background(), NodesKey, n.Id).Err(); err != nil {
return err
}