Coder Social home page Coder Social logo

Comments (11)

patricioe avatar patricioe commented on July 19, 2024 1

So given we want to test all public traffic... should the number here be Float::INFINITY or something?

Feel free to reach out to [email protected] so we can privately ask some numbers around how many impressions/feature flags evaluations you may producer and we can figure out the right number.
If you produce more than the queue size, usually impressions are dropped and we show a warning.

from ruby-client.

patricioe avatar patricioe commented on July 19, 2024 1

@metaskills Ken, quick follow up here.

When ruby operates in consumer mode using redis, impressions_queue_size is not used at all.

from ruby-client.

metaskills avatar metaskills commented on July 19, 2024

FYI, I was reading the detailed doc here (https://github.com/splitio/ruby-client/blob/master/Detailed-README.md) when I thought of this questions. I think maybe most people use a Redis backend or maybe a lot use memory. I just wanted to be sure I understood the differences when testing the product at scale.

from ruby-client.

maksimf avatar maksimf commented on July 19, 2024

What is stored in memory? Splits & Envs only? Per user treatments?

When using MemoryAdapters we store splits, segments, impressions and metrics data in memory, here you can see Repository objects. When we need to store something we use Repository for that, whereas Repository uses one of available adapters: :memory or :redis. Memory adapters diverge further, currently there are 2: MapAdapter and QueueAdapter.

Will the memory grow unbound or does it get collected?

Memory do not grow unbound, though it's not recommended to use memory adapters for a larger number of splits/segments/impressions/metrics (i.e. "descent" amount of web traffic) and this is why:

  • for splits and segments we don't remove them from memory at all, only add new and update old ones
  • for impressions and metrics we do remove them from memory after we bulk sent them to the Split API, but if you have a lot of impressions it can become a bottleneck: much more impressions coming in, then we remove. You can tweak size of the impressions queue and "refresh_rate" (how often impression queue get cleared), but it might not always help.

All things considered I'd recommend using Redis as adapter for scalability and memory for simplicity (faster and easier to set up).

Did I answer these questions? If not, please feel free to ask more.

from ruby-client.

metaskills avatar metaskills commented on July 19, 2024

You did answer that really well, thanks! Going to move forward with redis as the store. A few more questions then.

  • Can we assume all local data in redis if lost would rebuild from Split.IO? Not likely, just curious in case the Redis cluster was setup to act like an LRU.
  • Reading the docs/source for impressions_queue_size. I feel like the best setting would be -1?
  • When using redis, what mode would all app servers use? I'm thinking standalone the default is best because it would appear to mix both producer and consumer, is that true? If so, would it be recommended to spin up some other additional process on one of n servers to be a producer? Just looking for an ideal canned setup for a single & suite of Rails apps using redis.

Thanks again!

from ruby-client.

maksimf avatar maksimf commented on July 19, 2024

Can we assume all local data in redis if lost would rebuild from Split.IO? Not likely, just curious in case the Redis cluster was setup to act like an LRU.

Yes and no. Data which comes to you from Split API (i.e. splits and segments) will be restored, but impressions and metrics would be completely lost (since they are generated on your server(s) and then sent to Split API).

Reading the docs/source for impressions_queue_size. I feel like the best setting would be -1?

Not really, maybe it's not spelled right in the docs, but if you set impressions_queue_size to -1 it would disable impressions at all

When using redis, what mode would all app servers use? I'm thinking standalone the default is best because it would appear to mix both producer and consumer, is that true?

Yep, it's true

If so, would it be recommended to spin up some other additional process on one of n servers to be a producer?

Tough one, it completely depends on your infrastructure design, it's hard for me to give some abstract advice here.

from ruby-client.

metaskills avatar metaskills commented on July 19, 2024

Not really, maybe it's not spelled right in the docs, but if you set impressions_queue_size to -1 it would disable impressions at all

So given we want to test all public traffic... should the number here be Float::INFINITY or something?

from ruby-client.

patricioe avatar patricioe commented on July 19, 2024

When using redis, what mode would all app servers use? I'm thinking standalone the default is best because it would appear to mix both producer and consumer, is that true?

You will want to have on producer (we call it Split-sync and it's written in Go. https://docs.split.io/docs/split-synchronizer) and many Ruby consumers.
If you use many standalone ruby sdks, they will all write to redis.

from ruby-client.

maksimf avatar maksimf commented on July 19, 2024

@metaskills One more thing, I have to correct myself: we do delete splits from the cache (memory or redis) when they become archived (you can mark split archived in the UI)

from ruby-client.

maksimf avatar maksimf commented on July 19, 2024

@metaskills Should we close this issue? Or can I answer anything else?

from ruby-client.

metaskills avatar metaskills commented on July 19, 2024

Closed. Thanks again!

from ruby-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.