MAIF / izanami

Izanami is a centralized versatile feature flag solution, well suited for micro service architectures.
https://maif.github.io/izanami/
Apache License 2.0
189 stars 43 forks source link

Remove events from VariantResult model #707

Closed SoerenSilkjaer closed 1 year ago

SoerenSilkjaer commented 1 year ago

https://github.com/MAIF/izanami/issues/706

This is probably just the beginning. In order to really fix this issue the experiment result query must be offloaded to the store. In the current solution all events are downloaded into memory and iterated on the server, but this becomes very expensive when there are millions of events.

The experiment result is generated in the implementations of this trait https://github.com/maif/izanami/blob/master/izanami-server/app/domains/abtesting/events/events.scala#L193-L195

SoerenSilkjaer commented 1 year ago

Closed because this does not help at all. The issue is rather that in the current solution all events are downloaded into memory and iterated on the server. This becomes very expensive as soon as there are more than few thousands events.

larousso commented 1 year ago

Hi, I think that if you use elasticsearch as a backend for events, things are made by ES. For other backend, it is not possible to rely on DB so it's done in memory ...

SoerenSilkjaer commented 1 year ago

Hi. Thank you for the response.

I think postgres backend could do it too, a relational database should be able to do that. I am currently using the postgres backend.

Switching to elasticsearch seems like quite the hassle since we already switched from redis to postgres.

larousso commented 1 year ago

Hi, you're right the postgresql backend should do that to !

SoerenSilkjaer commented 1 year ago

Great! Is that something you guys have the time to implement or would you prefer I take a stab at it?

larousso commented 1 year ago

@pierrebruninmaif or @ptitFicus do you have time to work on that ?