Native dynamic datasource supported by Sentinel

In fact, Sentinel already build-in support dynamic datasource 👇

Sentinel official suggested that the dynamic rules pushed by sentinel-datasource rather than sentinel-client, like the following 👇 Howeve my demand is making the flowRules change according to the business data rather than my operation on the sentinel-dashboard.

Transform the interaction between systems

So we need transform the interaction between sentinel-client, etcd server and sentinet-dashboard, like the following (i used the etcd as the dynamic datasource)👇

Besides the common steps between offical suggested and my practice, we should takes one more step: add a listener to the business data(a collection named ‘Sla’ that stored in MongoDB) what builds new flowRules from the new business data and pushs to etcd server positively. Sentinel-etcd-datasource will automatically does the rest things.

The bug of sentinel

I found a bug when i used sentinel-etcd-datasource, and i committed a pull request which is already merged into the master branch and will be released in about v2.0.0👇