content large_stringlengths 3 20.5k | url large_stringlengths 54 193 | branch large_stringclasses 4
values | source large_stringclasses 42
values | embeddings listlengths 384 384 | score float64 -0.21 0.65 |
|---|---|---|---|---|---|
port number. \* Copy the template configuration file you'll find in the root directory of the Redis distribution into `/etc/redis/` using the port number as the name, for instance: ``` sudo cp redis.conf /etc/redis/6379.conf ``` \* Create a directory inside `/var/redis` that will work as both data and working directory... | https://github.com/redis/redis-doc/blob/master//docs/install/install-redis/_index.md | master | redis | [
0.01440864335745573,
-0.06046341732144356,
-0.1243775486946106,
-0.07624644041061401,
-0.05792854353785515,
-0.030447693541646004,
-0.020038483664393425,
0.05240250751376152,
-0.025242934003472328,
0.002321334555745125,
-0.009788503870368004,
0.019602561369538307,
0.005515875294804573,
-0.... | 0.030812 |
This tutorial shows you how to install RedisInsight on an AWS EC2 instance and manage ElastiCache Redis instances using RedisInsight. To complete this tutorial you must have access to the AWS Console and permissions to launch EC2 instances. Step 1: Create a new IAM Role (optional) -------------- RedisInsight needs read... | https://github.com/redis/redis-doc/blob/master//docs/install/install-redisinsight/install-on-aws.md | master | redis | [
0.03192877396941185,
-0.07435872405767441,
-0.10656822472810745,
-0.034815575927495956,
0.0022500657942146063,
-0.015465723350644112,
-0.03149986267089844,
0.009738398715853691,
0.03145140781998634,
0.030534589663147926,
-0.0000592709329794161,
-0.060531120747327805,
0.0011774880113080144,
... | 0.0639 |
(`redisinsight` in the command above). Find the IP Address of your EC2 instances and launch your browser at `http://:5540`. Accept the EULA and start using RedisInsight. RedisInsight also provides a health check endpoint at `http://:5540/api/health/` to monitor the health of the running container. Summary ------ In thi... | https://github.com/redis/redis-doc/blob/master//docs/install/install-redisinsight/install-on-aws.md | master | redis | [
0.11016394197940826,
0.04737265408039093,
-0.10362174361944199,
0.02622421458363533,
0.02019156515598297,
-0.06267273426055908,
-0.03258305415511131,
0.026485124602913857,
0.018333274871110916,
0.016642145812511444,
-0.0411863848567009,
-0.04154403507709503,
-0.022083204239606857,
-0.03795... | 0.113731 |
This tutorial shows how to install RedisInsight on [Kubernetes](https://kubernetes.io/) (K8s). This is an easy way to use RedisInsight with a [Redis Enterprise K8s deployment](https://redis.io/docs/about/redis-enterprise/#:~:text=and%20Multi%2Dcloud-,Redis%20Enterprise%20Software,-Redis%20Enterprise%20Software). ## Cre... | https://github.com/redis/redis-doc/blob/master//docs/install/install-redisinsight/install-on-k8s.md | master | redis | [
-0.011184287257492542,
-0.07721810787916183,
0.00931849516928196,
-0.017797274515032768,
-0.057600658386945724,
-0.00773435365408659,
0.0011495164362713695,
-0.013262835331261158,
0.032469768077135086,
0.022460782900452614,
-0.004088586196303368,
-0.037657469511032104,
-0.0022691290359944105... | 0.131001 |
managing, as defined by the pod template template: #pod template metadata: labels: app: redisinsight #label for pod/s spec: volumes: - name: redisinsight persistentVolumeClaim: claimName: redisinsight-pv-claim initContainers: - name: init image: busybox command: - /bin/sh - '-c' - | chown -R 1001 /data resources: {} vo... | https://github.com/redis/redis-doc/blob/master//docs/install/install-redisinsight/install-on-k8s.md | master | redis | [
0.031280893832445145,
-0.031377002596855164,
-0.0218564011156559,
0.035410843789577484,
0.023725176230072975,
-0.0015172830317169428,
0.008578651584684849,
0.03544183075428009,
0.028063125908374786,
0.04201580211520195,
0.04612075537443161,
-0.024178603664040565,
-0.05068487673997879,
-0.0... | 0.176124 |
You can configure RedisInsight with the following environment variables. | Variable | Purpose | Default | Additional info | | --- | --- | --- | --- | | RI\_APP\_PORT | The port that RedisInsight listens on | * Docker: 5540* desktop: 5530 | See [Express Documentation](https://expressjs.com/en/api.html#app.listen)| | RI\... | https://github.com/redis/redis-doc/blob/master//docs/install/install-redisinsight/env-variables.md | master | redis | [
-0.006077465135604143,
-0.02358597330749035,
-0.06908783316612244,
0.02815709076821804,
-0.023661760613322258,
-0.03587070107460022,
-0.05816156044602394,
0.04564481973648071,
0.008943332359194756,
0.023249905556440353,
-0.041441041976213455,
-0.05822870880365372,
-0.020289137959480286,
0.... | 0.100958 |
This tutorial shows how to install RedisInsight on [Docker](https://www.docker.com/) so you can use RedisInsight in development. See a separate guide for installing [RedisInsight on AWS](/docs/install/install-redisinsight/install-on-aws/). ## Install Docker The first step is to [install Docker for your operating system... | https://github.com/redis/redis-doc/blob/master//docs/install/install-redisinsight/install-on-docker.md | master | redis | [
0.0052583785727620125,
-0.035413410514593124,
-0.03808780014514923,
0.004468034952878952,
0.024753205478191376,
-0.004029196687042713,
-0.02703404426574707,
-0.0019007049268111587,
0.042541831731796265,
0.030692143365740776,
-0.012029443867504597,
-0.026576334610581398,
0.011309739202260971,... | -0.019451 |
--- title: "Redis geospatial" linkTitle: "Geospatial" weight: 80 description: > Introduction to the Redis Geospatial data type --- Redis geospatial indexes let you store coordinates and search for them. This data structure is useful for finding nearby points within a given radius or bounding box. ## Basic commands \* ... | https://github.com/redis/redis-doc/blob/master//docs/data-types/geospatial.md | master | redis | [
0.030392419546842575,
0.03156064823269844,
-0.05154750123620033,
0.0206051766872406,
0.008082360029220581,
-0.035682953894138336,
0.027034049853682518,
-0.006878120359033346,
0.008402817882597446,
-0.048173654824495316,
-0.009572195820510387,
0.019786298274993896,
0.07882729917764664,
-0.0... | 0.086702 |
A Redis sorted set is a collection of unique strings (members) ordered by an associated score. When more than one string has the same score, the strings are ordered lexicographically. Some use cases for sorted sets include: \* Leaderboards. For example, you can use sorted sets to easily maintain ordered lists of the hi... | https://github.com/redis/redis-doc/blob/master//docs/data-types/sorted-sets.md | master | redis | [
-0.04685000330209732,
-0.031360894441604614,
-0.045150987803936005,
-0.0141026321798563,
-0.05439871922135353,
-0.007659324444830418,
0.010124711319804192,
0.03111291117966175,
0.11643616110086441,
0.027132319286465645,
-0.02615544945001602,
0.10180945694446564,
0.054282672703266144,
-0.03... | 0.146585 |
1) "Ford" 2) "6" 3) "Sam-Bodden" 4) "8" 5) "Norem" 6) "10" 7) "Royce" 8) "10" 9) "Castilla" 10) "12" 11) "Prickett" 12) "14" {{< /clients-example >}} ### Operating on ranges Sorted sets are more powerful than this. They can operate on ranges. Let's get all the racers with 10 or fewer points. We use the `ZRANGEBYSCORE` ... | https://github.com/redis/redis-doc/blob/master//docs/data-types/sorted-sets.md | master | redis | [
-0.03733627498149872,
0.07342171669006348,
-0.059388045221567154,
0.03185809776186943,
-0.005703080911189318,
0.03397679701447487,
0.05727319046854973,
0.03245321661233902,
-0.05857619643211365,
-0.04775061085820198,
-0.03639063239097595,
-0.0013786006020382047,
0.0903572216629982,
0.00422... | 0.069563 |
the 128 bit space, and get the element's value discarding the prefix. If you want to see the feature in the context of a more serious demo, check the [Redis autocomplete demo](http://autocomplete.redis.io). Updating the score: leaderboards --- Just a final note about sorted sets before switching to the next topic. Sort... | https://github.com/redis/redis-doc/blob/master//docs/data-types/sorted-sets.md | master | redis | [
-0.012265494093298912,
-0.027921689674258232,
-0.0960269346833229,
-0.021179046481847763,
-0.0027167880907654762,
0.012307317927479744,
0.033495739102363586,
0.0549539215862751,
0.001723783672787249,
0.030375873669981956,
-0.041741929948329926,
0.07214251160621643,
0.10338146239519119,
-0.... | 0.118658 |
Bitmaps are not an actual data type, but a set of bit-oriented operations defined on the String type which is treated like a bit vector. Since strings are binary safe blobs and their maximum length is 512 MB, they are suitable to set up to 2^32 different bits. You can perform bitwise operations on one or more strings. ... | https://github.com/redis/redis-doc/blob/master//docs/data-types/bitmaps.md | master | redis | [
0.06124662607908249,
0.06692365556955338,
-0.06518448144197464,
-0.008159585297107697,
-0.011715101078152657,
-0.08149047940969467,
0.06083429604768753,
0.00601815665140748,
-0.07111410051584244,
-0.03172864019870758,
-0.057015836238861084,
-0.052947621792554855,
0.04684455692768097,
-0.01... | 0.15449 |
(integer) 1 {{< /clients-example >}} For example imagine you want to know the longest streak of daily visits of your web site users. You start counting days starting from zero, that is the day you made your web site public, and set a bit with `SETBIT` every time the user visits the web site. As a bit index you simply t... | https://github.com/redis/redis-doc/blob/master//docs/data-types/bitmaps.md | master | redis | [
0.028313612565398216,
0.09366688132286072,
-0.019247183576226234,
0.010356852784752846,
-0.064448282122612,
-0.0573369637131691,
0.059105776250362396,
0.024641895666718483,
-0.017261173576116562,
-0.011374762281775475,
-0.054251790046691895,
-0.04597903788089752,
0.06129808723926544,
-0.00... | 0.130002 |
--- title: "Redis Strings" linkTitle: "Strings" weight: 10 description: > Introduction to Redis strings --- Redis strings store sequences of bytes, including text, serialized objects, and binary arrays. As such, strings are the simplest type of value you can associate with a Redis key. They're often used for caching, ... | https://github.com/redis/redis-doc/blob/master//docs/data-types/strings.md | master | redis | [
-0.05872097983956337,
0.05068337917327881,
-0.06807676702737808,
0.03267688676714897,
-0.09616290032863617,
-0.04796835407614708,
0.1103987768292427,
0.05638767033815384,
0.03727736324071884,
-0.0699872374534607,
0.004375095944851637,
0.04859776794910431,
0.09221066534519196,
-0.0731128901... | 0.142182 |
it will never happen that client 1 reads "10", client 2 reads "10" at the same time, both increment to 11, and set the new value to 11. The final value will always be 12 and the read-increment-set operation is performed while all the other clients are not executing a command at the same time. ## Limits By default, a si... | https://github.com/redis/redis-doc/blob/master//docs/data-types/strings.md | master | redis | [
-0.10107573866844177,
-0.030146796256303787,
-0.11792946606874466,
-0.01391645334661007,
-0.1518252193927765,
-0.09647572785615921,
0.08677822351455688,
0.05375765264034271,
0.03489040583372116,
-0.00878407247364521,
0.0025839742738753557,
-0.0020194114185869694,
0.10210386663675308,
-0.07... | 0.13547 |
--- title: "Redis hashes" linkTitle: "Hashes" weight: 40 description: > Introduction to Redis hashes --- Redis hashes are record types structured as collections of field-value pairs. You can use hashes to represent basic objects and to store groupings of counters, among other things. {{< clients-example hash\_tutorial... | https://github.com/redis/redis-doc/blob/master//docs/data-types/hashes.md | master | redis | [
-0.009461713023483753,
0.060846664011478424,
-0.06226919963955879,
-0.013040022924542427,
-0.047261934727430344,
0.01280433963984251,
0.07774568349123001,
0.06385421752929688,
0.04174526780843735,
-0.03451018035411835,
-0.005077079404145479,
0.03568648919463158,
0.11615078151226044,
-0.075... | 0.085097 |
--- title: "Redis sets" linkTitle: "Sets" weight: 30 description: > Introduction to Redis sets --- A Redis set is an unordered collection of unique strings (members). You can use Redis sets to efficiently: \* Track unique items (e.g., track all unique IP addresses accessing a given blog post). \* Represent relations (... | https://github.com/redis/redis-doc/blob/master//docs/data-types/sets.md | master | redis | [
-0.01756751537322998,
0.008950472809374332,
-0.08704500645399094,
0.032434672117233276,
-0.0270239170640707,
0.002549173776060343,
0.07939454913139343,
0.002362634288147092,
-0.014142542146146297,
-0.036671821027994156,
0.01677645929157734,
-0.015287152491509914,
0.11238009482622147,
-0.06... | 0.181196 |
see some of these commands in action: {{< clients-example sets\_tutorial multisets >}} > SADD bikes:racing:france bike:1 bike:2 bike:3 (integer) 3 > SADD bikes:racing:usa bike:1 bike:4 (integer) 2 > SADD bikes:racing:italy bike:1 bike:2 bike:3 bike:4 (integer) 4 > SINTER bikes:racing:france bikes:racing:usa bikes:racin... | https://github.com/redis/redis-doc/blob/master//docs/data-types/sets.md | master | redis | [
0.0802299827337265,
0.07286101579666138,
-0.08321154117584229,
0.0002638458099681884,
-0.01003650389611721,
0.03370625898241997,
0.024097107350826263,
-0.011115715838968754,
-0.02476995624601841,
-0.053135666996240616,
0.008681013248860836,
-0.14600463211536407,
0.056252092123031616,
-0.05... | 0.019052 |
A Redis stream is a data structure that acts like an append-only log but also implements several operations to overcome some of the limits of a typical append-only log. These include random access in O(1) time and complex consumption strategies, such as consumer groups. You can use streams to record and simultaneously ... | https://github.com/redis/redis-doc/blob/master//docs/data-types/streams.md | master | redis | [
-0.04559827595949173,
-0.053056903183460236,
-0.07225418835878372,
0.014133865013718605,
0.05765043571591377,
-0.0605669841170311,
0.07972120493650436,
-0.014921597205102444,
0.08703179657459259,
-0.012183897197246552,
-0.030327679589390755,
0.012623355723917484,
-0.0027948715724051,
-0.01... | 0.205113 |
2 "1692632147973-0" {{< /clients-example >}} The above call to the `XADD` command adds an entry `rider: Castilla, speed: 29.9, position: 1, location\_id: 2` to the stream at key `race:france`, using an auto-generated entry ID, which is the one returned by the command, specifically `1692632147973-0`. It gets as its firs... | https://github.com/redis/redis-doc/blob/master//docs/data-types/streams.md | master | redis | [
-0.06198142096400261,
0.02668748050928116,
-0.04801389202475548,
-0.0855361595749855,
0.002725723199546337,
-0.017006607726216316,
0.07348623871803284,
0.02466714009642601,
0.044971395283937454,
-0.0043576606549322605,
-0.017606526613235474,
-0.03859781101346016,
0.05987847223877907,
-0.07... | 0.106965 |
If you're running Redis 7 or later, you can also provide an explicit ID consisting of the milliseconds part only. In this case, the sequence portion of the ID will be automatically generated. To do this, use the syntax below: {{< clients-example stream\_tutorial xadd\_7 >}} > XADD race:usa 0-\* racer Prickett 0-3 {{< /... | https://github.com/redis/redis-doc/blob/master//docs/data-types/streams.md | master | redis | [
-0.04507486894726753,
0.0028772258665412664,
-0.04376579821109772,
-0.04879990592598915,
0.07023444026708603,
-0.04379570856690407,
0.06128105893731117,
0.002366025699302554,
0.026801031082868576,
0.03134613856673241,
0.00396374799311161,
-0.012981577776372433,
-0.000952524715103209,
-0.04... | 0.072749 |
"position" 6) "3" 7) "location\_id" 8) "1" 3) 1) "1692632102976-0" 2) 1) "rider" 2) "Prickett" 3) "speed" 4) "29.7" 5) "position" 6) "2" 7) "location\_id" 8) "1" 4) 1) "1692632147973-0" 2) 1) "rider" 2) "Castilla" 3) "speed" 4) "29.9" 5) "position" 6) "1" 7) "location\_id" 8) "2" {{< /clients-example >}} Each entry ret... | https://github.com/redis/redis-doc/blob/master//docs/data-types/streams.md | master | redis | [
-0.050742775201797485,
0.06116756424307823,
-0.0610695444047451,
-0.043130308389663696,
-0.012275819666683674,
0.005724519025534391,
0.086082324385643,
0.01616564206779003,
0.03951958566904068,
-0.029393738135695457,
-0.008151127956807613,
-0.04023883119225502,
0.06769716739654541,
-0.0398... | 0.085253 |
that we've retrieved 4 items out of a stream that only had 4 entries in it, if we try to retrieve more items, we'll get an empty array: {{< clients-example stream\_tutorial xrange\_empty >}} > XRANGE race:france (1692632147973-0 + COUNT 2 (empty array) {{< /clients-example >}} Since `XRANGE` complexity is \*O(log(N))\*... | https://github.com/redis/redis-doc/blob/master//docs/data-types/streams.md | master | redis | [
0.0016427086666226387,
0.01173633523285389,
-0.01607595384120941,
-0.011800362728536129,
0.037302277982234955,
-0.08316605538129807,
0.04248330742120743,
-0.002628333866596222,
0.05744399130344391,
-0.037418365478515625,
0.029654286801815033,
-0.007126371376216412,
0.05412006378173828,
-0.... | 0.078558 |
8) "1" {{< /clients-example >}} The above is the non-blocking form of `XREAD`. Note that the \*\*COUNT\*\* option is not mandatory, in fact the only mandatory option of the command is the \*\*STREAMS\*\* option, that specifies a list of keys together with the corresponding maximum ID already seen for each stream by the... | https://github.com/redis/redis-doc/blob/master//docs/data-types/streams.md | master | redis | [
-0.03306635096669197,
0.003748878138139844,
-0.030227158218622208,
-0.015075835399329662,
-0.02823864482343197,
-0.0015312934992834926,
0.09650939702987671,
-0.003753532422706485,
0.015485616400837898,
-0.06001761555671692,
0.0008154248353093863,
-0.06945084780454636,
0.04645770788192749,
... | 0.102141 |
has no other options than \*\*COUNT\*\* and \*\*BLOCK\*\*, so it's a pretty basic command with a specific purpose to attach consumers to one or multiple streams. More powerful features to consume streams are available using the consumer groups API, however reading via consumer groups is implemented by a different comma... | https://github.com/redis/redis-doc/blob/master//docs/data-types/streams.md | master | redis | [
-0.06423516571521759,
-0.06349094212055206,
0.009036128409206867,
0.014412296935915947,
-0.025913845747709274,
-0.030078653246164322,
0.05879267677664757,
-0.059894852340221405,
0.07883240282535553,
-0.021839594468474388,
-0.023101309314370155,
-0.056079573929309845,
0.06488310545682907,
0... | 0.147236 |
about a stream: ``` +----------------------------------------+ | consumer\_group\_name: mygroup | | consumer\_group\_stream: somekey | | last\_delivered\_id: 1292309234234-92 | | | | consumers: | | "consumer-1" with pending messages | | 1292309234234-4 | | 1292309234232-8 | | "consumer-42" with pending messages | | ...... | https://github.com/redis/redis-doc/blob/master//docs/data-types/streams.md | master | redis | [
-0.09273980557918549,
-0.006353430915623903,
-0.011338874697685242,
0.013374569825828075,
-0.020386692136526108,
-0.005038862116634846,
0.10539045929908752,
-0.0682615116238594,
0.04398093372583389,
-0.017577357590198517,
0.0851183757185936,
-0.03927639126777649,
0.026035530492663383,
-0.0... | 0.095883 |
two arguments: the name of the consumer group, and the name of the consumer that is attempting to read. The option \*\*COUNT\*\* is also supported and is identical to the one in `XREAD`. We'll add riders to the race:italy stream and try reading something using the consumer group: Note: \*here rider is the field name, a... | https://github.com/redis/redis-doc/blob/master//docs/data-types/streams.md | master | redis | [
-0.0073967305943369865,
0.043480534106492996,
-0.06334546208381653,
0.0037427288480103016,
-0.025453997775912285,
-0.0003442515735514462,
0.08466670662164688,
0.023717407137155533,
-0.00008048755989875644,
-0.0703265443444252,
0.030149947851896286,
-0.13387171924114227,
0.02751954272389412,
... | 0.090746 |
XREADGROUP GROUP italy\_riders Bob COUNT 2 STREAMS race:italy > 1) 1) "race:italy" 2) 1) 1) "1692632647899-0" 2) 1) "rider" 2) "Royce" 2) 1) "1692632662819-0" 2) 1) "rider" 2) "Sam-Bodden" {{< /clients-example >}} Bob asked for a maximum of two messages and is reading via the same group `mygroup`. So what happens is th... | https://github.com/redis/redis-doc/blob/master//docs/data-types/streams.md | master | redis | [
-0.0032925494015216827,
-0.07167758792638779,
-0.03539561852812767,
0.02959350310266018,
-0.036978404968976974,
-0.03288444131612778,
0.0924513041973114,
-0.04139857739210129,
0.05102263391017914,
-0.03638504073023796,
0.016923416405916214,
-0.05974656715989113,
0.021845562383532524,
-0.02... | 0.132314 |
special ID in order to consume new messages. ## Recovering from permanent failures The example above allows us to write consumers that participate in the same consumer group, each taking a subset of messages to process, and when recovering from failures re-reading the pending messages that were delivered just to them. ... | https://github.com/redis/redis-doc/blob/master//docs/data-types/streams.md | master | redis | [
-0.09789830446243286,
-0.030651576817035675,
-0.03268060460686684,
0.07695072889328003,
0.05492298677563667,
-0.054232798516750336,
0.11660423874855042,
-0.02508614771068096,
0.035251934081315994,
-0.0019122941885143518,
0.06300639361143112,
0.03554759547114372,
0.025682009756565094,
-0.04... | 0.143138 |
was by just using `XRANGE`. {{< clients-example stream\_tutorial xrange\_pending >}} > XRANGE race:italy 1692632647899-0 1692632647899-0 1) 1) "1692632647899-0" 2) 1) "rider" 2) "Royce" {{< /clients-example >}} We have just to repeat the same ID twice in the arguments. Now that we have some ideas, Alice may decide that... | https://github.com/redis/redis-doc/blob/master//docs/data-types/streams.md | master | redis | [
-0.08442006260156631,
0.04470796883106232,
0.0011547323083505034,
-0.0037417386192828417,
0.020094148814678192,
0.001241066842339933,
0.10009724646806717,
-0.007700458634644747,
0.02907976694405079,
-0.01769126020371914,
0.061973027884960175,
-0.014377404004335403,
0.07857537269592285,
-0.... | 0.073164 |
signature looks like this: ``` XAUTOCLAIM [COUNT count] [JUSTID] ``` So, in the example above, I could have used automatic claiming to claim a single message like this: {{< clients-example stream\_tutorial xautoclaim >}} > XAUTOCLAIM race:italy italy\_riders Alice 60000 0-0 COUNT 1 1) "0-0" 2) 1) 1) "1692632662819-0" 2... | https://github.com/redis/redis-doc/blob/master//docs/data-types/streams.md | master | redis | [
-0.09496626257896423,
0.0876171737909317,
-0.017943205311894417,
-0.01760629378259182,
0.060550615191459656,
-0.07614120841026306,
0.11179596930742264,
0.026570862159132957,
0.05435393378138542,
-0.04969450831413269,
-0.020856864750385284,
-0.07507345825433731,
0.08106637001037598,
0.04910... | 0.042103 |
12) 1) "1692632639151-0" 2) 1) "rider" 2) "Castilla" 13) "last-entry" 14) 1) "1692632678249-0" 2) 1) "rider" 2) "Norem" {{< /clients-example >}} The output shows information about how the stream is encoded internally, and also shows the first and last message in the stream. Another piece of information available is the... | https://github.com/redis/redis-doc/blob/master//docs/data-types/streams.md | master | redis | [
-0.04788714274764061,
0.025141960009932518,
-0.052385468035936356,
-0.009667241014540195,
0.02712627500295639,
0.006606542970985174,
0.09489372372627258,
-0.007107491139322519,
0.08634329587221146,
-0.10123677551746368,
0.02759263850748539,
-0.07554004341363907,
-0.04416432976722717,
-0.01... | 0.161848 |
stream is not automatically partitioned to multiple instances. We could say that schematically the following is true: \* If you use 1 stream -> 1 consumer, you are processing messages in order. \* If you use N streams with N consumers, so that only a given consumer hits a subset of the N streams, you can scale the abov... | https://github.com/redis/redis-doc/blob/master//docs/data-types/streams.md | master | redis | [
-0.06601231545209885,
-0.08647863566875458,
-0.026728151366114616,
-0.007375672925263643,
0.03899046778678894,
-0.020884977653622627,
-0.057998161762952805,
0.027345990762114525,
0.105473093688488,
-0.004379841964691877,
-0.05868476629257202,
-0.002514369087293744,
-0.004860265180468559,
-... | 0.108572 |
don't really need this to be exactly 1000 items. It can be 1000 or 1010 or 1030, just make sure to save at least 1000 items. With this argument, the trimming is performed only when we can remove a whole node. This makes it much more efficient, and it is usually what you want. You'll note here that the client libraries ... | https://github.com/redis/redis-doc/blob/master//docs/data-types/streams.md | master | redis | [
0.03893233835697174,
0.1472998410463333,
-0.0022982421796768904,
-0.06628171354532242,
-0.018070215359330177,
-0.05707363411784172,
0.022324848920106888,
0.052101269364356995,
-0.04000639170408249,
-0.0043719857931137085,
0.0011335944291204214,
-0.010951746255159378,
0.043792303651571274,
... | 0.035635 |
the `XADD` command, means to auto select an ID for us for the new entry. So we have `-`, `+`, `$`, `>` and `\*`, and all have a different meaning, and most of the time, can be used in different contexts. ## Persistence, replication and message safety A Stream, like any other Redis data structure, is asynchronously repl... | https://github.com/redis/redis-doc/blob/master//docs/data-types/streams.md | master | redis | [
-0.043514955788850784,
-0.0864742249250412,
-0.08724330365657806,
0.0024444255977869034,
0.081298828125,
-0.0375736728310585,
0.06075557321310043,
-0.060328319668769836,
0.05837720260024071,
0.006618123967200518,
0.048184946179389954,
0.047237902879714966,
0.047673020511865616,
-0.07042781... | 0.076286 |
was called. The reason why such an asymmetry exists is because Streams may have associated consumer groups, and we do not want to lose the state that the consumer groups defined just because there are no longer any items in the stream. Currently the stream is not deleted even when it has no associated consumer groups. ... | https://github.com/redis/redis-doc/blob/master//docs/data-types/streams.md | master | redis | [
-0.009627869352698326,
-0.06625887006521225,
-0.059193965047597885,
0.023357784375548363,
0.0405929796397686,
-0.08391659706830978,
0.01479449961334467,
-0.055001433938741684,
0.0887335017323494,
-0.04605768993496895,
0.060464322566986084,
-0.012406867928802967,
0.0013821845641359687,
-0.0... | 0.071353 |
and Ruby programs reading the messages from the consumer group and processing them. The message processing step consisted of comparing the current computer time with the message timestamp, in order to understand the total latency. Results obtained: ``` Processed between 0 and 1 ms -> 74.11% Processed between 1 and 2 ms... | https://github.com/redis/redis-doc/blob/master//docs/data-types/streams.md | master | redis | [
-0.0016277293907478452,
-0.09415843337774277,
-0.04698331654071808,
0.08808381855487823,
0.00778320524841547,
-0.12954573333263397,
0.0037717244122177362,
-0.01648498699069023,
0.02271948754787445,
-0.001498704426921904,
0.0038815070874989033,
0.021183768287301064,
0.02514570765197277,
-0.... | 0.011037 |
--- title: "Redis lists" linkTitle: "Lists" weight: 20 description: > Introduction to Redis lists --- Redis lists are linked lists of string values. Redis lists are frequently used to: \* Implement stacks and queues. \* Build queue management for background worker systems. ## Basic commands \* `LPUSH` adds a new eleme... | https://github.com/redis/redis-doc/blob/master//docs/data-types/lists.md | master | redis | [
-0.1049436405301094,
0.017207413911819458,
-0.06874255836009979,
0.015964725986123085,
0.059041447937488556,
-0.06396790593862534,
0.08365488797426224,
0.030756505206227303,
0.011866321787238121,
0.0007157707586884499,
0.04928705468773842,
0.04351644963026047,
0.03268784284591675,
-0.08088... | 0.219885 |
`LPUSH` command to the head of a list with ten elements is the same as adding an element to the head of list with 10 million elements. What's the downside? Accessing an element \*by index\* is very fast in lists implemented with an Array (constant time indexed access) and not so fast in lists implemented by linked list... | https://github.com/redis/redis-doc/blob/master//docs/data-types/lists.md | master | redis | [
-0.04928239434957504,
-0.012081928551197052,
-0.06530498713254929,
0.050401248037815094,
0.01690514385700226,
-0.04005221277475357,
0.022719308733940125,
0.06559216231107712,
0.021726960316300392,
0.04368880018591881,
0.006607625167816877,
0.10553018748760223,
-0.017730260267853737,
-0.076... | 0.152704 |
using a consumer-producer pattern where the producer pushes items into a list, and a consumer (usually a \*worker\*) consumes those items and executes actions. Redis has special list commands to make this use case both more reliable and efficient. For example both the popular Ruby libraries [resque](https://github.com/... | https://github.com/redis/redis-doc/blob/master//docs/data-types/lists.md | master | redis | [
-0.1173194870352745,
-0.0020049794111400843,
-0.1084350049495697,
0.044193968176841736,
0.06355288624763489,
-0.06645044684410095,
0.01113133504986763,
0.047048937529325485,
-0.0032231484074145555,
0.024577533826231956,
0.039865415543317795,
0.09361712634563446,
0.0551297590136528,
-0.0627... | 0.210114 |
process items from the list, consumers call `RPOP`. However it is possible that sometimes the list is empty and there is nothing to process, so `RPOP` just returns NULL. In this case a consumer is forced to wait some time and retry again with `RPOP`. This is called \*polling\*, and is not a good idea in this context be... | https://github.com/redis/redis-doc/blob/master//docs/data-types/lists.md | master | redis | [
-0.09134628623723984,
0.009125836193561554,
-0.06958746165037155,
0.05057801678776741,
0.016514014452695847,
-0.07480474561452866,
0.11141102761030197,
-0.018461482599377632,
0.0690813735127449,
0.016803909093141556,
0.00455239275470376,
0.007824554108083248,
-0.00669553317129612,
-0.08107... | 0.161263 |
an empty aggregate data type is created before adding the element. 2. When we remove elements from an aggregate data type, if the value remains empty, the key is automatically destroyed. The Stream data type is the only exception to this rule. 3. Calling a read-only command such as `LLEN` (which returns the length of t... | https://github.com/redis/redis-doc/blob/master//docs/data-types/lists.md | master | redis | [
-0.015895642340183258,
0.05591090768575668,
0.0488605871796608,
0.052599724382162094,
-0.013954231515526772,
-0.04452483355998993,
0.05899390950798988,
0.032088857144117355,
0.05117947235703468,
0.043285567313432693,
0.0045177144929766655,
-0.01413762103766203,
0.03042786568403244,
-0.0379... | 0.009352 |
Redis bitfields let you set, increment, and get integer values of arbitrary bit length. For example, you can operate on anything from unsigned 1-bit integers to signed 63-bit integers. These values are stored using binary-encoded Redis strings. Bitfields support atomic read, write and increment operations, making them ... | https://github.com/redis/redis-doc/blob/master//docs/data-types/bitfields.md | master | redis | [
-0.03857726231217384,
0.008441347628831863,
-0.11893593519926071,
0.030523475259542465,
-0.06278104335069656,
-0.07797526568174362,
0.048286762088537216,
0.04387610778212547,
0.05295173078775406,
-0.007532325107604265,
-0.03623969852924347,
0.01304719503968954,
0.04826132208108902,
-0.0426... | 0.225406 |
Redis is a data structure server. At its core, Redis provides a collection of native data types that help you solve a wide variety of problems, from [caching](/docs/manual/client-side-caching/) to [queuing](/docs/data-types/lists/) to [event processing](/docs/data-types/streams/). Below is a short description of each d... | https://github.com/redis/redis-doc/blob/master//docs/data-types/_index.md | master | redis | [
-0.039889831095933914,
-0.047128595411777496,
-0.05433335900306702,
-0.0013817725703120232,
-0.05067426711320877,
-0.12723073363304138,
0.05521445348858833,
0.029669955372810364,
0.0032712393440306187,
0.008491151966154575,
-0.04840564355254173,
0.055540166795253754,
-0.009310547262430191,
... | 0.199425 |
HyperLogLog is a probabilistic data structure that estimates the cardinality of a set. As a probabilistic data structure, HyperLogLog trades perfect accuracy for efficient space utilization. The Redis HyperLogLog implementation uses up to 12 KB and provides a standard error of 0.81%. Counting unique items usually requi... | https://github.com/redis/redis-doc/blob/master//docs/data-types/probabilistic/hyperloglogs.md | master | redis | [
0.05811745673418045,
-0.028949199244379997,
-0.08554413914680481,
0.034425992518663406,
-0.043438516557216644,
-0.08038485050201416,
0.055759645998477936,
-0.014566863887012005,
0.057912759482860565,
0.010863530449569225,
-0.013020643033087254,
0.038965560495853424,
0.05828213691711426,
0.... | 0.100121 |
and every IP/identifier is added to it on every visit. ## Basic commands \* `PFADD` adds an item to a HyperLogLog. \* `PFCOUNT` returns an estimate of the number of items in the set. \* `PFMERGE` combines two or more HyperLogLogs into one. See the [complete list of HyperLogLog commands](https://redis.io/commands/?group... | https://github.com/redis/redis-doc/blob/master//docs/data-types/probabilistic/hyperloglogs.md | master | redis | [
0.0061974539421498775,
-0.06844671070575714,
-0.0807194784283638,
0.02047766000032425,
-0.01897873915731907,
-0.06277050822973251,
0.054812852293252945,
0.01115867868065834,
0.02707834169268608,
0.027949005365371704,
0.00827128067612648,
0.03142328932881355,
0.03231234475970268,
-0.0454339... | 0.117638 |
At the base of Redis replication (excluding the high availability features provided as an additional layer by Redis Cluster or Redis Sentinel) there is a \*leader follower\* (master-replica) replication that is simple to use and configure. It allows replica Redis instances to be exact copies of master instances. The re... | https://github.com/redis/redis-doc/blob/master//docs/management/replication.md | master | redis | [
-0.05188029631972313,
-0.06497368961572647,
0.02145465463399887,
0.08167289197444916,
0.050075285136699677,
-0.043341390788555145,
-0.026543883606791496,
-0.02527637965977192,
0.05869900807738304,
0.017283782362937927,
-0.03321971371769905,
0.07934124022722244,
0.06680777668952942,
-0.0837... | 0.149207 |
initial synchronization or a partial resynchronization. \* Replication is also largely non-blocking on the replica side. While the replica is performing the initial synchronization, it can handle queries using the old version of the dataset, assuming you configured Redis to do so in redis.conf. Otherwise, you can confi... | https://github.com/redis/redis-doc/blob/master//docs/management/replication.md | master | redis | [
-0.0631798729300499,
-0.040368009358644485,
-0.03955943137407303,
0.009206605143845081,
-0.02691393718123436,
-0.05699077248573303,
-0.037800755351781845,
-0.059096019715070724,
0.05370201915502548,
0.0125027010217309,
-0.00664353696629405,
0.1252690851688385,
0.049641337245702744,
-0.0635... | 0.127138 |
changes modifying the dataset. The replication offset is incremented even if no replica is actually connected, so basically every given pair of: Replication ID, offset Identifies an exact version of the dataset of a master. When replicas connect to masters, they use the `PSYNC` command to send their old master replicat... | https://github.com/redis/redis-doc/blob/master//docs/management/replication.md | master | redis | [
-0.01820230856537819,
-0.00703688059002161,
0.02038644813001156,
0.010292209684848785,
0.0274765994399786,
-0.015499426051974297,
-0.08581043034791946,
-0.06788009405136108,
0.018802132457494736,
0.020784951746463776,
-0.024235079064965248,
0.09083231538534164,
0.07406812906265259,
-0.1322... | 0.047982 |
that are promoted to masters. After a failover, the promoted replica requires to still remember what was its past replication ID, because such replication ID was the one of the former master. In this way, when other replicas will sync with the new master, they will try to perform a partial resynchronization using the o... | https://github.com/redis/redis-doc/blob/master//docs/management/replication.md | master | redis | [
-0.062249671667814255,
-0.014055510051548481,
0.073819600045681,
-0.008809289894998074,
0.06253232806921005,
0.03272082656621933,
-0.009675918146967888,
-0.046876128762960434,
0.05905912071466446,
-0.013763549737632275,
-0.015628695487976074,
0.07438952475786209,
0.10857921838760376,
-0.05... | 0.066354 |
to revert the read-only setting and have replica instances that can be targeted by write operations. The answer is that writable replicas exist only for historical reasons. Using writable replicas can result in inconsistency between the master and the replica, so it is not recommended to use writable replicas. To under... | https://github.com/redis/redis-doc/blob/master//docs/management/replication.md | master | redis | [
-0.03221486508846283,
-0.03408902511000633,
0.018053993582725525,
0.04917149990797043,
-0.044947218149900436,
-0.010156787000596523,
-0.07034759223461151,
-0.019122282043099403,
0.05624117702245712,
0.06140805780887604,
0.011034158989787102,
0.15960609912872314,
0.05189190432429314,
-0.047... | 0.022492 |
replica and the master. Also note that since Redis 4.0 replica writes are only local, and are not propagated to sub-replicas attached to the instance. Sub-replicas instead will always receive the replication stream identical to the one sent by the top-level master to the intermediate replicas. So for example in the fol... | https://github.com/redis/redis-doc/blob/master//docs/management/replication.md | master | redis | [
-0.0030455701053142548,
-0.05390583723783493,
-0.06492067873477936,
0.010763992555439472,
-0.04787476733326912,
-0.03572666272521019,
-0.022453416138887405,
-0.0384744256734848,
0.046595025807619095,
0.004642433021217585,
-0.06441543996334076,
0.036934804171323776,
0.13313870131969452,
-0.... | 0.017594 |
time. To deal with that the replica uses its logical clock to report that a key does not exist \*\*only for read operations\*\* that don't violate the consistency of the data set (as new commands from the master will arrive). In this way replicas avoid reporting logically expired keys that are still existing. In practi... | https://github.com/redis/redis-doc/blob/master//docs/management/replication.md | master | redis | [
-0.10570939630270004,
-0.026839112862944603,
0.00006415533425752074,
0.022527359426021576,
0.056584492325782776,
-0.07958705723285675,
-0.07688482850790024,
0.02187296375632286,
0.10277891159057617,
0.03400746360421181,
0.05355951562523842,
0.11607750505208969,
-0.0026827778201550245,
-0.0... | 0.064343 |
continue accepting writes for some time, so using the same replication ID in the promoted replica would violate the rule that a replication ID and offset pair identifies only a single data set. Moreover, replicas - when powered off gently and restarted - are able to store in the `RDB` file the information needed to res... | https://github.com/redis/redis-doc/blob/master//docs/management/replication.md | master | redis | [
-0.02622784674167633,
-0.07120747864246368,
-0.017242377623915672,
-0.020377641543745995,
0.010916564613580704,
0.01864829659461975,
-0.03710808604955673,
-0.08571087568998337,
0.02258250117301941,
0.07850286364555359,
-0.014811510220170021,
0.15052561461925507,
0.048973944038152695,
-0.04... | -0.020316 |
## Redis setup tips ### Linux \* Deploy Redis using the Linux operating system. Redis is also tested on OS X, and from time to time on FreeBSD and OpenBSD systems. However, Linux is where most of the stress testing is performed, and where most production deployments are run. \* Set the Linux kernel overcommit memory se... | https://github.com/redis/redis-doc/blob/master//docs/management/admin.md | master | redis | [
0.03805091604590416,
-0.013404464349150658,
-0.08517080545425415,
0.013870288617908955,
0.07548245042562485,
-0.12222534418106079,
-0.021004680544137955,
0.048895999789237976,
-0.023728691041469574,
0.02743043750524521,
0.012448926456272602,
0.015357320196926594,
-0.0018602843629196286,
-0... | 0.115781 |
about how to secure Redis. ## Running Redis on EC2 \* Use HVM based instances, not PV based instances. \* Do not use old instance families. For example, use m3.medium with HVM instead of m1.medium with PV. \* The use of Redis persistence with EC2 EBS volumes needs to be handled with care because sometimes EBS volumes h... | https://github.com/redis/redis-doc/blob/master//docs/management/admin.md | master | redis | [
-0.017078334465622902,
-0.006312356796115637,
-0.05118498206138611,
-0.05198332667350769,
0.0014728271635249257,
-0.012688564136624336,
-0.054636355489492416,
-0.005260765086859465,
-0.00954605732113123,
0.001026646699756384,
-0.028474798426032066,
0.03248976916074753,
0.07090101391077042,
... | 0.019813 |
This page tries to help you with what to do if you have issues with Redis. Part of the Redis project is helping people that are experiencing problems because we don't like to leave people alone with their issues. \* If you have \*\*latency problems\*\* with Redis, that in some way appears to be idle for some time, read... | https://github.com/redis/redis-doc/blob/master//docs/management/troubleshooting.md | master | redis | [
0.017335105687379837,
-0.048038989305496216,
-0.05743124336004257,
0.02497659996151924,
-0.021090544760227203,
-0.11084925383329391,
-0.00037656695349141955,
0.029510946944355965,
-0.004934667143970728,
0.016517499461770058,
-0.008969167247414589,
0.030684204772114754,
0.012126196175813675,
... | 0.138835 |
Redis Sentinel provides high availability for Redis when not using [Redis Cluster](/docs/manual/scaling). Redis Sentinel also provides other collateral tasks such as monitoring, notifications and acts as a configuration provider for clients. This is the full list of Sentinel capabilities at a macroscopic level (i.e. th... | https://github.com/redis/redis-doc/blob/master//docs/management/sentinel.md | master | redis | [
-0.00508908461779356,
-0.10282447189092636,
-0.00780158955603838,
0.07058768719434738,
0.05213196948170662,
-0.06776586174964905,
0.024689912796020508,
-0.003829787252470851,
0.03904516249895096,
0.012674772180616856,
-0.057434093207120895,
0.03861283138394356,
0.047905124723911285,
-0.031... | 0.216598 |
path is not writable. Sentinels by default run \*\*listening for connections to TCP port 26379\*\*, so for Sentinels to work, port 26379 of your servers \*\*must be open\*\* to receive connections from the IP addresses of the other Sentinel instances. Otherwise Sentinels can't talk and can't agree about what to do, so ... | https://github.com/redis/redis-doc/blob/master//docs/management/sentinel.md | master | redis | [
0.01654811017215252,
-0.11943759024143219,
-0.012349594384431839,
0.04534748196601868,
-0.017801348119974136,
-0.048904888331890106,
-0.026016948744654655,
0.013674384914338589,
0.01277786772698164,
0.028925713151693344,
-0.06863536685705185,
0.02882838249206543,
0.025718877092003822,
-0.0... | 0.137276 |
not reachable, in order to really mark the master as failing, and eventually start a failover procedure if possible. \* However \*\*the quorum is only used to detect the failure\*\*. In order to actually perform a failover, one of the Sentinels need to be elected leader for the failover and be authorized to proceed. Th... | https://github.com/redis/redis-doc/blob/master//docs/management/sentinel.md | master | redis | [
-0.011064676567912102,
-0.09548000991344452,
0.05991694703698158,
0.01683819107711315,
0.0025288534816354513,
-0.0016868436941877007,
-0.05858886241912842,
0.009217998012900352,
-0.01735035516321659,
0.041528623551130295,
-0.048928774893283844,
-0.030759047716856003,
0.051654838025569916,
... | 0.134486 |
Also note that: \* Masters are called M1, M2, M3, ..., Mn. \* Replicas are called R1, R2, R3, ..., Rn (R stands for \*replica\*). \* Sentinels are called S1, S2, S3, ..., Sn. \* Clients are called C1, C2, C3, ..., Cn. \* When an instance changes role because of Sentinel actions, we put it inside square brackets, so [M1... | https://github.com/redis/redis-doc/blob/master//docs/management/sentinel.md | master | redis | [
-0.05591438710689545,
-0.06199095770716667,
0.06576979905366898,
0.019405841827392578,
-0.023085104301571846,
0.02056356705725193,
0.0016623169649392366,
0.00013379483425524086,
-0.020202796906232834,
-0.006020460743457079,
-0.049662746489048004,
-0.05180945619940758,
0.08781315386295319,
... | 0.183524 |
so the replica R2 is promoted to master. However clients, like C1, that are in the same partition as the old master, may continue to write data to the old master. This data will be lost forever since when the partition will heal, the master will be reconfigured as a replica of the new master, discarding its data set. T... | https://github.com/redis/redis-doc/blob/master//docs/management/sentinel.md | master | redis | [
-0.05542869120836258,
-0.07068219780921936,
0.0000770205951994285,
0.04355710744857788,
0.048722364008426666,
-0.034979674965143204,
-0.04833446815609932,
-0.007628561928868294,
0.04237987846136093,
0.004662834573537111,
-0.007684726268053055,
0.10584244877099991,
0.08207660168409348,
-0.0... | 0.05603 |
master would never be available during replica failures. So this is a valid setup but the setup in the Example 2 has advantages such as the HA system of Redis running in the same boxes as Redis itself which may be simpler to manage, and the ability to put a bound on the amount of time a master in the minority partition... | https://github.com/redis/redis-doc/blob/master//docs/management/sentinel.md | master | redis | [
-0.04491302743554115,
-0.05947723239660263,
-0.009814083576202393,
0.04406629130244255,
-0.03824429586529732,
-0.024426352232694626,
-0.06112903729081154,
0.02907312661409378,
-0.011524444445967674,
0.054356373846530914,
-0.04742696136236191,
-0.005788817536085844,
0.10876079648733139,
-0.... | 0.089741 |
you can use the following two Sentinel configuration directives in order to force Sentinel to announce a specific set of IP and port: sentinel announce-ip sentinel announce-port Note that Docker has the ability to run in \*host networking mode\* (check the `--net=host` option for more information). This should create n... | https://github.com/redis/redis-doc/blob/master//docs/management/sentinel.md | master | redis | [
0.002858725842088461,
-0.050820350646972656,
0.0029786245431751013,
0.018299650400877,
-0.017828000709414482,
-0.04560833424329758,
-0.03306346759200096,
-0.06277751177549362,
0.01680913008749485,
0.06068495288491249,
-0.06444720923900604,
-0.025719981640577316,
0.004450871143490076,
-0.00... | 0.106703 |
amount of time. Once you start the three Sentinels, you'll see a few messages they log, like: +monitor master mymaster 127.0.0.1 6379 quorum 2 This is a Sentinel event, and you can receive this kind of events via Pub/Sub if you `SUBSCRIBE` to the event name as specified later in [\_Pub/Sub Messages\_ section](#pubsub-m... | https://github.com/redis/redis-doc/blob/master//docs/management/sentinel.md | master | redis | [
0.051179975271224976,
-0.12780551612377167,
-0.022735120728611946,
0.05423879250884056,
0.053677164018154144,
-0.07845745235681534,
-0.021405857056379318,
-0.03797505795955658,
0.03214070945978165,
0.022128557786345482,
-0.07809492945671082,
-0.019642721861600876,
0.028462806716561317,
-0.... | 0.118212 |
So far so good... At this point you may jump to create your Sentinel deployment or can read more to understand all the Sentinel commands and internals. ## Sentinel API Sentinel provides an API in order to inspect its state, check the health of monitored masters and replicas, subscribe in order to receive specific notif... | https://github.com/redis/redis-doc/blob/master//docs/management/sentinel.md | master | redis | [
0.008403084240853786,
-0.10563309490680695,
-0.03935984522104263,
0.04928354173898697,
0.049708977341651917,
-0.06856502592563629,
0.015436844900250435,
-0.01415012963116169,
0.0036462002899497747,
0.03697850555181503,
-0.10004667937755585,
-0.033056072890758514,
0.010635990649461746,
-0.0... | 0.20624 |
of the Sentinel instance. \* \*\*SENTINEL PENDING-SCRIPTS\*\* This command returns information about pending scripts. \* \*\*SENTINEL REMOVE\*\* Stop Sentinel's monitoring. Refer to the [\_Reconfiguring Sentinel at Runtime\_ section](#reconfiguring-sentinel-at-runtime) for more information. \* \*\*SENTINEL REPLICAS ``\... | https://github.com/redis/redis-doc/blob/master//docs/management/sentinel.md | master | redis | [
-0.013478495180606842,
-0.1027231365442276,
0.014863025397062302,
0.07365920394659042,
0.11655434966087341,
-0.03712446242570877,
-0.010037295520305634,
-0.013440102338790894,
-0.02914651855826378,
0.057161808013916016,
-0.01568359136581421,
-0.038208361715078354,
-0.015672532841563225,
-0... | 0.213948 |
command of Redis, and is used in order to change configuration parameters of a specific master. Multiple option / value pairs can be specified (or none at all). All the configuration parameters that can be configured via `sentinel.conf` are also configurable using the SET command. The following is an example of `SENTIN... | https://github.com/redis/redis-doc/blob/master//docs/management/sentinel.md | master | redis | [
0.014644878916442394,
-0.026520445942878723,
-0.0784311518073082,
0.05402650311589241,
-0.08426492661237717,
0.005845887586474419,
0.001972717698663473,
0.015854395925998688,
-0.026906553655862808,
0.009067350067198277,
-0.03756048530340195,
0.023364000022411346,
0.008104757405817509,
-0.0... | 0.1262 |
master). One after the other, waiting at least 30 seconds between instances. 3. Check that all the Sentinels agree about the number of Sentinels currently active, by inspecting the output of `SENTINEL MASTER mastername` of every Sentinel. ### Removing the old master or unreachable replicas Sentinels never forget about ... | https://github.com/redis/redis-doc/blob/master//docs/management/sentinel.md | master | redis | [
-0.015303983353078365,
-0.1238648071885109,
0.056636013090610504,
0.07189472019672394,
0.0735686868429184,
-0.038985732942819595,
-0.05896436423063278,
-0.029199307784438133,
0.012716402299702168,
0.01766398176550865,
-0.024376031011343002,
0.011566383764147758,
0.017224624752998352,
-0.05... | 0.099655 |
is now in Objectively Down state. \* \*\*-odown\*\* `` -- The specified instance is no longer in Objectively Down state. \* \*\*+new-epoch\*\* `` -- The current epoch was updated. \* \*\*+try-failover\*\* `` -- New failover in progress, waiting to be elected by the majority. \* \*\*+elected-leader\*\* `` -- Won the ele... | https://github.com/redis/redis-doc/blob/master//docs/management/sentinel.md | master | redis | [
-0.08190207928419113,
-0.0024760267697274685,
0.058194924145936966,
-0.006555548403412104,
-0.03816197067499161,
-0.009642302989959717,
-0.02820730023086071,
-0.05269339308142662,
-0.11819908767938614,
0.07507535815238953,
0.005574143026024103,
-0.06385491788387299,
0.06629889458417892,
-0... | 0.120256 |
sentinel auth-pass Where `` and `` are the username and password for accessing the group's instances. These credentials should be provisioned on all of the group's Redis instances with the minimal control permissions. For example: 127.0.0.1:6379> ACL SETUSER sentinel-user ON >somepassword allchannels +multi +slaveof +p... | https://github.com/redis/redis-doc/blob/master//docs/management/sentinel.md | master | redis | [
-0.025412673130631447,
-0.06031021103262901,
-0.0854908749461174,
0.04736017435789108,
-0.014376995153725147,
-0.0322730615735054,
0.0003414570528548211,
-0.021510303020477295,
0.03190866857767105,
0.007820445112884045,
-0.04610539972782135,
-0.00033701187931001186,
0.06845833361148834,
-0... | 0.120902 |
\*\*all\*\* your Sentinel instances as follows: requirepass "your\_password\_here" When configured this way, Sentinels will do two things: 1. A password will be required from clients in order to send commands to Sentinels. This is obvious since this is how such configuration directive works in Redis in general. 2. More... | https://github.com/redis/redis-doc/blob/master//docs/management/sentinel.md | master | redis | [
-0.009867251850664616,
-0.08884882181882858,
-0.07029099017381668,
0.02457374893128872,
-0.004978482145816088,
-0.028430387377738953,
0.05024755001068115,
-0.015735575929284096,
0.028805391862988472,
0.005449961870908737,
-0.05735732614994049,
-0.006967372260987759,
0.07734227925539017,
0.... | 0.113004 |
but no failover can be triggered without reaching the ODOWN state. The ODOWN condition \*\*only applies to masters\*\*. For other kind of instances Sentinel doesn't require to act, so the ODOWN state is never reached for replicas and other sentinels, but only SDOWN is. However SDOWN has also semantic implications. For ... | https://github.com/redis/redis-doc/blob/master//docs/management/sentinel.md | master | redis | [
-0.009062771685421467,
-0.09733639657497406,
0.04094330966472626,
0.08491846919059753,
0.049890268594026566,
-0.006919878534972668,
0.02588556706905365,
-0.009737632237374783,
-0.0075541902333498,
-0.010423519648611546,
-0.05900121107697487,
-0.01807982660830021,
0.026649072766304016,
-0.0... | 0.136374 |
be selected. The replica selection process evaluates the following information about replicas: 1. Disconnection time from the master. 2. Replica priority. 3. Replication offset processed. 4. Run ID. A replica that is found to be disconnected from the master for more than ten times the configured master timeout (down-af... | https://github.com/redis/redis-doc/blob/master//docs/management/sentinel.md | master | redis | [
-0.013272356241941452,
-0.07034130394458771,
0.03473624214529991,
0.069268137216568,
0.048868414014577866,
-0.041160766035318375,
-0.01352805644273758,
0.009173759259283543,
0.007396749686449766,
0.03495850786566734,
-0.030377648770809174,
0.030731577426195145,
0.02130999229848385,
-0.0585... | 0.104407 |
state. \* Once the failover is triggered, the Sentinel trying to failover is required to ask for authorization to a majority of Sentinels (or more than the majority if the quorum is set to a number greater than the majority). The difference may seem subtle but is actually quite simple to understand and use. For example... | https://github.com/redis/redis-doc/blob/master//docs/management/sentinel.md | master | redis | [
0.004925278015434742,
-0.05732840299606323,
0.08961298316717148,
0.03851398080587387,
0.00043973352876491845,
-0.000551417819224298,
-0.02622458152472973,
0.0439513698220253,
0.009201628156006336,
0.03232796490192413,
-0.09140946716070175,
-0.024160701781511307,
0.06212617829442024,
-0.016... | 0.146185 |
point, even if the reconfiguration of the replicas is in progress, the failover is considered to be successful, and all the Sentinels are required to start reporting the new configuration. The way a new configuration is propagated is the reason why we need that every Sentinel failover is authorized with a different ver... | https://github.com/redis/redis-doc/blob/master//docs/management/sentinel.md | master | redis | [
0.013270863331854343,
-0.09481886029243469,
0.0401248000562191,
0.02101440355181694,
0.0591590590775013,
-0.04282427951693535,
-0.02306370623409748,
-0.027119923382997513,
0.027519404888153076,
-0.0007685685995966196,
-0.04105490446090698,
0.05295713618397713,
0.049762506037950516,
-0.0613... | 0.108308 |
could be handy that Client B is still able to write to the old master, even if its data will be lost. \* If you are using Redis as a store, this is not good and you need to configure the system in order to partially prevent this problem. Since Redis is asynchronously replicated, there is no way to totally prevent data ... | https://github.com/redis/redis-doc/blob/master//docs/management/sentinel.md | master | redis | [
-0.06075255945324898,
-0.059418536722660065,
0.004526928532868624,
0.03303515911102295,
0.011812726967036724,
-0.015144620090723038,
-0.019858725368976593,
-0.014895564876496792,
0.05640653893351555,
0.013142130337655544,
-0.02654126286506653,
0.06614470481872559,
0.1103183701634407,
-0.06... | -0.000376 |
that more or less 100 milliseconds will elapse between two calls to the timer interrupt. What a Sentinel does is to register the previous time the timer interrupt was called, and compare it with the current call: if the time difference is negative or unexpectedly big (2 seconds or more) the TILT mode is entered (or if ... | https://github.com/redis/redis-doc/blob/master//docs/management/sentinel.md | master | redis | [
-0.013237474486231804,
-0.09724252671003342,
-0.0027047356124967337,
0.09935658425092697,
0.05473286285996437,
-0.03768838196992874,
0.00514734024181962,
0.024973101913928986,
0.06521693617105484,
0.013727609999477863,
0.017511142417788506,
-0.0042520128190517426,
-0.029676910489797592,
-0... | 0.159743 |
Redis is able to start without a configuration file using a built-in default configuration, however this setup is only recommended for testing and development purposes. The proper way to configure Redis is by providing a Redis configuration file, usually called `redis.conf`. The `redis.conf` file contains a number of d... | https://github.com/redis/redis-doc/blob/master//docs/management/config.md | master | redis | [
-0.05040813609957695,
-0.04949400946497917,
-0.10447674244642258,
0.00535792950540781,
-0.04438082501292229,
-0.043714284896850586,
0.006555465050041676,
0.02969120256602764,
-0.017111152410507202,
-0.030371708795428276,
-0.017012478783726692,
-0.009721151553094387,
0.10911327600479126,
-0... | 0.06968 |
as an example): maxmemory 2mb maxmemory-policy allkeys-lru In this configuration there is no need for the application to set a time to live for keys using the `EXPIRE` command (or equivalent) since all the keys will be evicted using an approximated LRU algorithm as long as we hit the 2 megabyte memory limit. Basically,... | https://github.com/redis/redis-doc/blob/master//docs/management/config.md | master | redis | [
-0.01908491924405098,
-0.05130266025662422,
-0.06461382657289505,
-0.004595996346324682,
-0.009833695366978645,
-0.10285785049200058,
-0.010935473255813122,
0.06289588660001755,
-0.012130656279623508,
0.024585621431469917,
0.0447424054145813,
0.10194411873817444,
0.02457539178431034,
-0.05... | 0.127566 |
Persistence refers to the writing of data to durable storage, such as a solid-state disk (SSD). Redis provides a range of persistence options. These include: \* \*\*RDB\*\* (Redis Database): RDB persistence performs point-in-time snapshots of your dataset at specified intervals. \* \*\*AOF\*\* (Append Only File): AOF p... | https://github.com/redis/redis-doc/blob/master//docs/management/persistence.md | master | redis | [
-0.026268821209669113,
-0.03714948892593384,
-0.13177193701267242,
0.04007207229733467,
-0.02009243704378605,
0.011566642671823502,
-0.0006294981576502323,
-0.011890474706888199,
0.04437762498855591,
0.009575779549777508,
0.010616892017424107,
0.10255138576030731,
0.03965500742197037,
-0.0... | 0.124762 |
you can only lose one second worth of writes. \* The AOF log is an append-only log, so there are no seeks, nor corruption problems if there is a power outage. Even if the log ends with a half-written command for some reason (disk full or other reasons) the redis-check-aof tool is able to fix it easily. \* Redis is able... | https://github.com/redis/redis-doc/blob/master//docs/management/persistence.md | master | redis | [
-0.026006802916526794,
-0.03562110662460327,
-0.04802185669541359,
0.0415194109082222,
0.04287159442901611,
-0.14532065391540527,
-0.028410566970705986,
-0.013222446665167809,
0.045448631048202515,
0.08593522012233734,
-0.0004984384286217391,
0.12062779814004898,
-0.00976688601076603,
-0.1... | 0.099817 |
works Whenever Redis needs to dump the dataset to disk, this is what happens: \* Redis [forks](http://linux.die.net/man/2/fork). We now have a child and a parent process. \* The child starts to write the dataset to a temporary RDB file. \* When the child is done writing the new RDB file, it replaces the old one. This m... | https://github.com/redis/redis-doc/blob/master//docs/management/persistence.md | master | redis | [
-0.04535692557692528,
-0.03695344552397728,
-0.04178910329937935,
-0.0077859098091721535,
0.07490044087171555,
-0.08263066411018372,
-0.01950065791606903,
0.049427881836891174,
0.018144559115171432,
0.06960712373256683,
0.027054758742451668,
0.09850171208381653,
0.012386481277644634,
-0.08... | 0.050691 |
rewrite, Redis introduces an AOF rewrite limiting mechanism to ensure that failed AOF rewrites are retried at a slower and slower rate. ### How durable is the append only file? You can configure how many times Redis will [`fsync`](http://linux.die.net/man/2/fsync) data on disk. There are three options: \* `appendfsync ... | https://github.com/redis/redis-doc/blob/master//docs/management/persistence.md | master | redis | [
-0.014192631468176842,
-0.05600365251302719,
-0.04689597710967064,
0.060380179435014725,
0.03240739181637764,
-0.17412827908992767,
-0.06490413844585419,
0.023423396050930023,
0.05163438245654106,
0.07198701053857803,
-0.009567445144057274,
0.08426792919635773,
-0.017162440344691277,
-0.10... | 0.103755 |
thing to do is to run the `redis-check-aof` utility, initially without the `--fix` option, then understand the problem, jump to the given offset in the file, and see if it is possible to manually repair the file: The AOF uses the same format of the Redis protocol and is quite simple to fix manually. Otherwise it is pos... | https://github.com/redis/redis-doc/blob/master//docs/management/persistence.md | master | redis | [
-0.06871099025011063,
-0.02123037539422512,
0.011335649527609348,
-0.028122929856181145,
0.04832563176751137,
-0.15864941477775574,
-0.003760841442272067,
0.003389270743355155,
0.01803559623658657,
0.08509005606174469,
0.02109266258776188,
0.07144910842180252,
-0.02062125876545906,
-0.0793... | 0.037242 |
loss of your data. Next time you restart the server: \* Before restarting the server, wait for AOF rewrite to finish persisting the data. You can do that by watching `INFO persistence`, waiting for `aof\_rewrite\_in\_progress` and `aof\_rewrite\_scheduled` to be `0`, and validating that `aof\_last\_bgrewrite\_status` i... | https://github.com/redis/redis-doc/blob/master//docs/management/persistence.md | master | redis | [
0.02303253673017025,
-0.09099069237709045,
-0.04970495030283928,
0.00048639794113114476,
-0.02452365681529045,
-0.06231139227747917,
-0.02546599693596363,
-0.00771087221801281,
0.0457211509346962,
0.08184179663658142,
-0.013571641407907009,
0.04320867732167244,
0.019166231155395508,
-0.075... | 0.012493 |
all you need to do is copy/tar the files in this directory to achieve a backup. However, if this is done during a [rewrite](#log-rewriting), you might end up with an invalid backup. To work around this you must disable AOF rewrites during the backup: 1. Turn off automatic rewrites with `CONFIG SET` `auto-aof-rewrite-pe... | https://github.com/redis/redis-doc/blob/master//docs/management/persistence.md | master | redis | [
-0.024636657908558846,
-0.024229777976870537,
0.01359512284398079,
-0.009378047659993172,
0.04117593914270401,
-0.06708372384309769,
-0.04032246023416519,
-0.005876598414033651,
0.01171881053596735,
0.08862552046775818,
0.023061677813529968,
0.03882790356874466,
-0.02109210193157196,
-0.05... | -0.056525 |
At least, make absolutely sure that after the transfer is completed you are able to verify the file size (that should match the one of the file you copied) and possibly the SHA1 digest, if you are using a VPS. You also need some kind of independent alert system if the transfer of fresh backups is not working for some r... | https://github.com/redis/redis-doc/blob/master//docs/management/persistence.md | master | redis | [
-0.018092362210154533,
-0.03893586993217468,
0.020574213936924934,
-0.06333129853010178,
0.09040848910808563,
-0.08059395849704742,
-0.04860258102416992,
-0.057680923491716385,
0.03006238304078579,
-0.007757821120321751,
0.048142578452825546,
-0.008145729079842567,
0.0338069386780262,
-0.0... | -0.056549 |
Redis scales horizontally with a deployment topology called Redis Cluster. This topic will teach you how to set up, test, and operate Redis Cluster in production. You will learn about the availability and consistency characteristics of Redis Cluster from the end user's point of view. If you plan to run a production Red... | https://github.com/redis/redis-doc/blob/master//docs/management/scaling.md | master | redis | [
0.00893899891525507,
-0.07188446819782257,
-0.04274929687380791,
0.018197467550635338,
-0.020913006737828255,
-0.07991746813058853,
-0.0338410884141922,
0.02358138933777809,
-0.04001723602414131,
-0.004408087581396103,
-0.01574981026351452,
0.016130393370985985,
0.05502571910619736,
-0.031... | 0.143249 |
and to compute the hash slot for a given key, we simply take the CRC16 of the key modulo 16384. Every node in a Redis Cluster is responsible for a subset of the hash slots, so, for example, you may have a cluster with 3 nodes, where: \* Node A contains hash slots from 0 to 5500. \* Node B contains hash slots from 5501 ... | https://github.com/redis/redis-doc/blob/master//docs/management/scaling.md | master | redis | [
0.011518135666847229,
-0.007014083210378885,
-0.08334773778915405,
-0.0006504403427243233,
-0.0010888103861361742,
-0.07189338654279709,
-0.026923155412077904,
-0.029489006847143173,
0.029425591230392456,
0.024040276184678078,
0.029973139986395836,
0.03872251138091087,
0.0687176063656807,
... | 0.118207 |
following happens: \* Your client writes to the master B. \* The master B replies OK to your client. \* The master B propagates the write to its replicas B1, B2 and B3. As you can see, B does not wait for an acknowledgement from B1, B2, B3 before replying to the client, since this would be a prohibitive latency penalty... | https://github.com/redis/redis-doc/blob/master//docs/management/scaling.md | master | redis | [
-0.012510817497968674,
-0.07654902338981628,
-0.013328630477190018,
0.04765569791197777,
-0.005841184873133898,
-0.044843729585409164,
-0.03311464563012123,
-0.023230260238051414,
0.07451347261667252,
0.031132681295275688,
-0.04869953915476799,
0.09756337106227875,
0.11451797187328339,
-0.... | 0.078446 |
## Redis Cluster configuration parameters We are about to create an example cluster deployment. Before we continue, let's introduce the configuration parameters that Redis Cluster introduces in the `redis.conf` file. \* \*\*cluster-enabled ``\*\*: If yes, enables Redis Cluster support in a specific Redis instance. Othe... | https://github.com/redis/redis-doc/blob/master//docs/management/scaling.md | master | redis | [
-0.005058981478214264,
-0.0250448789447546,
-0.06220295652747154,
0.08382658660411835,
0.0641281008720398,
-0.017600663006305695,
0.00723333191126585,
-0.012596477754414082,
-0.006592470686882734,
-0.006430542562156916,
0.008783607743680477,
0.057776615023612976,
0.05003809928894043,
-0.08... | 0.164415 |
changes in the cluster. This option can be set to yes to allow reads from a node during the fail state, which is useful for applications that want to prioritize read availability but still want to prevent inconsistent writes. It can also be used for when using Redis Cluster with only one or two shards, as it allows the... | https://github.com/redis/redis-doc/blob/master//docs/management/scaling.md | master | redis | [
0.004968269262462854,
-0.07250837981700897,
-0.010480138473212719,
0.061505407094955444,
0.002524367766454816,
-0.05038146302103996,
-0.040043603628873825,
0.024370821192860603,
0.0007511575822718441,
0.016076989471912384,
-0.05244207754731178,
0.037763021886348724,
0.07112780958414078,
-0... | 0.118197 |
127.0.0.1:7000 127.0.0.1:7001 \ 127.0.0.1:7002 127.0.0.1:7003 127.0.0.1:7004 127.0.0.1:7005 \ --cluster-replicas 1 The command used here is \*\*create\*\*, since we want to create a new cluster. The option `--cluster-replicas 1` means that we want a replica for every master created. The other arguments are the list of ... | https://github.com/redis/redis-doc/blob/master//docs/management/scaling.md | master | redis | [
0.0029859091155231,
-0.06876183301210403,
-0.05662044882774353,
0.012005507946014404,
-0.032665103673934937,
-0.04607637599110603,
-0.012739812955260277,
-0.030327625572681427,
0.004748154431581497,
-0.015607481822371483,
-0.01909252069890499,
-0.05589509382843971,
0.09609350562095642,
-0.... | 0.124604 |
at the same time try to make nodes failing, or start a resharding, to see how Redis Cluster behaves under real world conditions. It is not very helpful to see what happens while nobody is writing to the cluster. This section explains some basic usage of [redis-rb-cluster](https://github.com/antirez/redis-rb-cluster) sh... | https://github.com/redis/redis-doc/blob/master//docs/management/scaling.md | master | redis | [
-0.021853094920516014,
-0.03802219405770302,
-0.08068274706602097,
0.08743464201688766,
0.06582150608301163,
-0.05307117849588394,
-0.032063886523246765,
-0.03078790381550789,
-0.016806069761514664,
0.030564801767468452,
-0.031202463433146477,
0.04634694755077362,
0.041641540825366974,
-0.... | 0.111725 |
fact that this is a busy loop without real parallelism of course, so you'll get the usually 10k ops/second in the best of the conditions). Normally writes are slowed down in order for the example application to be easier to follow by humans. Starting the application produces the following output: ``` ruby ./example.rb ... | https://github.com/redis/redis-doc/blob/master//docs/management/scaling.md | master | redis | [
-0.006668249145150185,
-0.08346865326166153,
-0.10448949784040451,
0.0884690135717392,
0.023279927670955658,
-0.08661819994449615,
-0.046138931065797806,
0.0356975682079792,
-0.054904449731111526,
0.017223969101905823,
-0.029367689043283463,
0.07040345668792725,
0.029286060482263565,
-0.08... | 0.112376 |
the parameters in an interactive way. This is possible using a command line like the following: redis-cli --cluster reshard : --cluster-from --cluster-to --cluster-slots --cluster-yes This allows to build some automatism if you are likely to reshard often, however currently there is no way for `redis-cli` to automatica... | https://github.com/redis/redis-doc/blob/master//docs/management/scaling.md | master | redis | [
0.01863222010433674,
-0.0611729770898819,
-0.09653838723897934,
0.05841529741883278,
-0.021970026195049286,
-0.05888441950082779,
0.04156653583049774,
-0.0119472062215209,
-0.009206175804138184,
-0.016871344298124313,
-0.005518864840269089,
-0.03156936541199684,
0.08264194428920746,
-0.064... | 0.153023 |
program reports 114 lost writes (`INCR` commands that are not remembered by the cluster). This program is much more interesting as a test case, so we'll use it to test the Redis Cluster failover. #### Test the failover To trigger the failover, the simplest thing we can do (that is also the semantically simplest failure... | https://github.com/redis/redis-doc/blob/master//docs/management/scaling.md | master | redis | [
0.0157025083899498,
-0.062441349029541016,
-0.013738328590989113,
0.06134828180074692,
0.05392728000879288,
-0.04955471679568291,
-0.035633791238069534,
0.03078249655663967,
-0.031738877296447754,
0.029172636568546295,
-0.008871158584952354,
-0.0014911189209669828,
0.07881700992584229,
-0.... | 0.1265 |
\* flags: master, replica, myself, fail, ... \* if it is a replica, the Node ID of the master \* Time of the last pending PING still waiting for a reply. \* Time of the last PONG received. \* Configuration epoch for this node (see the Cluster specification). \* Status of the link to this node. \* Slots served... #### M... | https://github.com/redis/redis-doc/blob/master//docs/management/scaling.md | master | redis | [
-0.035962361842393875,
-0.018856311216950417,
-0.013000092469155788,
0.030026020482182503,
0.04922162741422653,
-0.07014614343643188,
0.03143289312720299,
0.0031294208019971848,
-0.021284082904458046,
0.006150117143988609,
-0.015409900806844234,
0.042946819216012955,
0.049512650817632675,
... | 0.146823 |
new tab in your terminal application. \* Enter the `cluster-test` directory. \* Create a directory named `7006`. \* Create a redis.conf file inside, similar to the one used for the other nodes but using 7006 as port number. \* Finally start the server with `../redis-server ./redis.conf` At this point the server should ... | https://github.com/redis/redis-doc/blob/master//docs/management/scaling.md | master | redis | [
0.008886884897947311,
-0.08978790789842606,
-0.11324114352464676,
0.0364999882876873,
-0.01945330947637558,
-0.04553304240107536,
-0.0011749311815947294,
-0.022573331370949745,
-0.0323294997215271,
0.016034703701734543,
0.0017806042451411486,
-0.04845412075519562,
0.06343386322259903,
-0.0... | 0.106839 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.