-
Im running a few federated graphql servers and we are trying to keep things as simple and up to date as possible. In order to prevent having to restart our gateway every time we make a schema change, we utilize experimental_pollInterval. We don't want the complexity of a graphql manager. We want a very simple federated schema. This works perfectly! However there is that warning that says
I struggle to see why this is bad? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Our recommendation is that you use a single source of truth for the schema to avoid schema flapping during roll-outs. With one running instance of every downstream service (i.e. no load-balancer in front of downstream services), it's fine. However, a single server is not very scalable and usually, there is a load-balancer in front of those containers. In that mode of operation and with polling enabled, if a downstream service is in the middle of a rollout and containers are changing from running one schema to another, the gateway (or multiple gateways) may start flapping back and forth between in-flight schemas during the roll-over as they poll. One of the offerings of our cloud product provides that single source of truth: Basically, we host the fully-composed schema in our schema registry. It updates automatically when you use Hope that helps explain the risk! Of course, if that isn't relevant to you — or isn't relevant yet, then you can probably use the option safely. |
Beta Was this translation helpful? Give feedback.
Our recommendation is that you use a single source of truth for the schema to avoid schema flapping during roll-outs. With one running instance of every downstream service (i.e. no load-balancer in front of downstream services), it's fine. However, a single server is not very scalable and usually, there is a load-balancer in front of those containers. In that mode of operation and with polling enabled, if a downstream service is in the middle of a rollout and containers are changing from running one schema to another, the gateway (or multiple gateways) may start flapping back and forth between in-flight schemas during the roll-over as they poll.
One of the offerings of our cloud product p…