Comments (11)
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.
@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.
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.
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.
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.
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.
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.
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.
@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.
@metaskills Should we close this issue? Or can I answer anything else?
from ruby-client.
Closed. Thanks again!
from ruby-client.
Related Issues (20)
- JRuby support HOT 4
- [redacted] please ignore
- [redacted]
- cache_ttl in consumer mode HOT 1
- splits_repository.splits is significantly more costly than splits_repository.split_names HOT 2
- `fix_latencies` is running every restart by each app server, affecting Redis performance HOT 4
- Occasionally split_manager returns empty list of splits HOT 15
- Redis.exists? deprecation warning from redis v4.2.2 HOT 3
- block_until_ready doesn't timeout if the api key is invalid HOT 9
- Quickstart: SDK Setup code does not work HOT 4
- 7.2.3 performance issues HOT 5
- High CPU usage on wrong split key HOT 4
- Update Rake version to support development on Ruby 3 HOT 2
- Update CI to target non-EOL Ruby HOT 2
- Split logger errors HOT 2
- SDK not sync configuration changes in Rails console HOT 3
- Faraday 2.0+ compatibility HOT 5
- Splitio: #IOError: stream closed in another thread HOT 5
- Stream Event Parsing Silently Failing and Not Falling Back to Polling HOT 3
- Error during a parsing event HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ruby-client.