Search code examples
performancetoggletogglzff4j

Performance comparaison betwen ff4j and togglz


We're working on a project , and we want to use some toggling feature tool like ff4j or togglz but we have a real constraints about performances, i mean we really need a tool with the less time of execution , i've checked a little bit ff4j and togglz but i don't know what is best for this solution, or may be if you know some other tools.

Context of project: its a netflix microservices architecture, so we have eureka,ribbon,zuul and microservices.

otherwise , if you have another solution , may be develop a sidecar please give me some ideas.

thank you in advance :)


Solution

  • Disclaimer : I created FF4j, as such I won't give you answer relative to performance comparison. I will provide architecture design principles.

    Microservices means distributed architecture so you will have to store the state of your features in a common persistence storage (DB).

    The cost of feature toggle framework won't be time to evaluate the feature state predicate (it is a simple condition) it will be the time to access the data from the persistence storage.

    FF4j provides support for both REDIS and CONSUL:

    • Redis seems a good candidate as very fast for put/get and distribute.
    • Consul is also a good idea in distributed microservice : it provides a key-value store.
    • Eureka may does the same, I don't know, ff4j does not have store for it yet.

    If you have to store your features in a slower DB such as SQL-Like then you might consider to use caching. FF4j provides some cacheProxy to handle such use cases.

    Other Considerations :

    • Put the administration console only in a backend application not on each microservices (security + performance overhead)
    • Feature Toggle can do more with Configuration Management and monitoring.

    You may want to have a look at this 15min talk exactly on that subject. LIVE DEMO starting at 7:10

    and related github repository for sample with Spring-Cloud