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 |
|---|---|---|---|---|---|
node was added as a replica but you want to move it as a replica of a different master. For example in order to add a replica for the node 127.0.0.1:7005 that is currently serving hash slots in the range 11423-16383, that has a Node ID 3c3a0c74aae0b56170ccb03a76b60cfe7dc1912e, all I need to do is to connect with the ne... | https://github.com/redis/redis-doc/blob/master//docs/management/scaling.md | master | redis | [
-0.01302539836615324,
-0.058920975774526596,
-0.07986045628786087,
-0.0033220057375729084,
-0.0032414663583040237,
-0.042154550552368164,
-0.0074203466065227985,
-0.02114631049335003,
0.016587674617767334,
0.018954338505864143,
0.003853902919217944,
0.0016342045273631811,
0.0717175304889679,... | 0.068513 |
same time, simply because there is no other instance to have a copy of the hash slots the master was serving. However while net-splits are likely to isolate a number of nodes at the same time, many other kind of failures, like hardware or software failures local to a single node, are a very notable class of failures th... | https://github.com/redis/redis-doc/blob/master//docs/management/scaling.md | master | redis | [
-0.016683924943208694,
-0.07424747943878174,
0.08635293692350388,
-0.014720343053340912,
0.08639340102672577,
-0.01662748120725155,
-0.08684229850769043,
0.06541427969932556,
0.07161673903465271,
0.04272409528493881,
-0.009592247195541859,
0.0385371558368206,
0.0470513217151165,
-0.0517408... | 0.069501 |
library or Redis proxy. In both cases it is possible to migrate to Redis Cluster easily, however what is the most important detail is if multiple-keys operations are used by the application, and how. There are three different cases: 1. Multiple keys operations, or transactions, or Lua scripts involving multiple keys, a... | https://github.com/redis/redis-doc/blob/master//docs/management/scaling.md | master | redis | [
-0.03632980212569237,
-0.06624741852283478,
-0.08159492164850235,
-0.031127437949180603,
-0.03926736116409302,
-0.09414703398942947,
0.02689056657254696,
0.007383143063634634,
0.09053044766187668,
-0.005941166076809168,
0.02722601778805256,
0.0445609912276268,
0.06952597945928574,
-0.07755... | 0.120648 |
2.8 instance as source instance the operation may be slow since 2.8 does not implement migrate connection caching, so you may want to restart your source instance with a Redis 3.x version before to perform such operation. {{% alert title="Note" color="info" %}} Starting with Redis 5, if not for backward compatibility, ... | https://github.com/redis/redis-doc/blob/master//docs/management/scaling.md | master | redis | [
-0.002928853500634432,
0.021053878590464592,
-0.03425344079732895,
0.03868745639920235,
0.03762965276837349,
-0.04690628871321678,
0.03342876955866814,
-0.04604623094201088,
0.03903302922844887,
-0.014448157511651516,
-0.022947300225496292,
0.01602991297841072,
0.06268077343702316,
-0.0425... | 0.085663 |
Redis is developed with an emphasis on stability. We do our best with every release to make sure you'll experience a stable product with no crashes. However, if you ever need to debug the Redis process itself, read on. When Redis crashes, it produces a detailed report of what happened. However, sometimes looking at the... | https://github.com/redis/redis-doc/blob/master//docs/management/debugging.md | master | redis | [
-0.03158900886774063,
-0.06452319025993347,
-0.0345316156744957,
0.008037964813411236,
0.036771129816770554,
-0.0654892697930336,
0.0021107150241732597,
0.06391917169094086,
-0.05502258613705635,
0.05256589502096176,
-0.08213034272193909,
0.028025304898619652,
-0.01280164159834385,
-0.0458... | 0.105717 |
info | grep process\_id process\_id:58414 In the above example the process ID is \*\*58414\*\*. Login into your Redis server. (Optional but recommended) Start \*\*screen\*\* or \*\*tmux\*\* or any other program that will make sure that your GDB session will not be closed if your ssh connection times out. You can learn ... | https://github.com/redis/redis-doc/blob/master//docs/management/debugging.md | master | redis | [
0.002788831014186144,
-0.08966488391160965,
-0.1186734139919281,
-0.06363508105278015,
0.012222272343933582,
-0.028966978192329407,
0.044027797877788544,
-0.021185999736189842,
0.0655241310596466,
-0.009745816700160503,
-0.012888931669294834,
0.0286230631172657,
-0.008013934828341007,
-0.0... | 0.04229 |
contain all the data that was inside the Redis instance at the time of the crash; Redis developers will make sure not to share the content with anyone else, and will delete the file as soon as it is no longer used for debugging purposes, but you are warned that by sending the core file you are sending your data. ## Wha... | https://github.com/redis/redis-doc/blob/master//docs/management/debugging.md | master | redis | [
0.032696910202503204,
-0.07127460837364197,
-0.0412885807454586,
-0.01734909601509571,
0.06244344636797905,
-0.04108109325170517,
0.014821220189332962,
0.07180603593587875,
-0.07654979825019836,
0.039920125156641006,
-0.012520764023065567,
-0.002641182392835617,
0.022681210190057755,
-0.07... | 0.051658 |
The Redis ACL, short for Access Control List, is the feature that allows certain connections to be limited in terms of the commands that can be executed and the keys that can be accessed. The way it works is that, after connecting, a client is required to provide a username and a valid password to authenticate. If auth... | https://github.com/redis/redis-doc/blob/master//docs/management/security/acl.md | master | redis | [
-0.08206125348806381,
-0.07331458479166031,
-0.13168257474899292,
0.0372595340013504,
-0.05225690081715584,
-0.01044051256030798,
0.051512621343135834,
-0.00867076963186264,
0.06962918490171432,
-0.03171400725841522,
0.006189072970300913,
0.07157952338457108,
0.06409141421318054,
-0.002691... | 0.089444 |
defaults-configured Redis instance is: > ACL LIST 1) "user default on nopass ~\* &\* +@all" The command above reports the list of users in the same format that is used in the Redis configuration files, by translating the current ACLs set for the users back into their description. The first two words in each line are "u... | https://github.com/redis/redis-doc/blob/master//docs/management/security/acl.md | master | redis | [
-0.04574798792600632,
-0.0630381852388382,
-0.13076689839363098,
0.017911206930875778,
-0.03760673105716705,
-0.01622871868312359,
0.07343311607837677,
-0.023896025493741035,
0.04508492723107338,
-0.01506085880100727,
0.009929167106747627,
0.02787170186638832,
0.074332594871521,
-0.0024448... | 0.090537 |
`%R~`: (Available in Redis 7.0 and later) Add the specified read key pattern. This behaves similar to the regular key pattern but only grants permission to read from keys that match the given pattern. See [key permissions](#key-permissions) for more information. \* `%W~`: (Available in Redis 7.0 and later) Add the spec... | https://github.com/redis/redis-doc/blob/master//docs/management/security/acl.md | master | redis | [
-0.03623725101351738,
-0.027267811819911003,
-0.08343257755041122,
0.01267014630138874,
-0.03879769891500473,
-0.020788582041859627,
0.06464845687150955,
-0.0261596217751503,
0.03594008460640907,
0.012536115013062954,
-0.009731577709317207,
0.03192674368619919,
0.07436791807413101,
0.02345... | 0.043134 |
as that user.\* Configure selectors for the user: \* `()`: (Available in Redis 7.0 and later) Create a new selector to match rules against. Selectors are evaluated after the user permissions, and are evaluated according to the order they are defined. If a command matches either the user permissions or any selector, it ... | https://github.com/redis/redis-doc/blob/master//docs/management/security/acl.md | master | redis | [
-0.041695207357406616,
-0.03305346518754959,
-0.1117653176188469,
0.030648184940218925,
-0.06002170965075493,
-0.03329736739397049,
0.11695142090320587,
-0.06966456770896912,
-0.009526838548481464,
-0.02273392863571644,
0.013762340880930424,
0.01456967368721962,
0.06197543069720268,
0.0210... | 0.057791 |
NOPERM this user has no permissions to access one of the keys used as arguments > GET cached:1234 (nil) > SET cached:1234 zap (error) NOPERM this user has no permissions to run the 'set' command Things are working as expected. In order to inspect the configuration of the user alice (remember that user names are case se... | https://github.com/redis/redis-doc/blob/master//docs/management/security/acl.md | master | redis | [
0.0023136308882385492,
0.05210036411881447,
-0.1594035029411316,
-0.03130709379911423,
-0.09576855599880219,
-0.05127129331231117,
0.15272879600524902,
-0.030278563499450684,
-0.0029224357567727566,
-0.00903234165161848,
0.06379014253616333,
-0.031002158299088478,
0.0675654336810112,
-0.06... | 0.079436 |
command table. Modules may expose dangerous things and in the case of an ACL that is just additive, that is, in the form of `+@all -...` You should be absolutely sure that you'll never include what you did not mean to. The following is a list of command categories and their meanings: \* \*\*admin\*\* - Administrative c... | https://github.com/redis/redis-doc/blob/master//docs/management/security/acl.md | master | redis | [
-0.04766251519322395,
0.010171470232307911,
-0.09362371265888214,
0.0215839222073555,
-0.02351536601781845,
-0.04125365987420082,
0.04751383513212204,
0.0026437833439558744,
-0.04047536849975586,
0.03389161452651024,
0.09606283158063889,
-0.0679907500743866,
0.08130848407745361,
-0.0436084... | 0.101012 |
commands except DEBUG. In order to allow/block specific DEBUG subcommands, see the next section. ## Allow the first-arg of a blocked command \*\*Note: This feature is deprecated since Redis 7.0 and may be removed in the future.\*\* Sometimes the ability to exclude or include a command or a subcommand as a whole is not ... | https://github.com/redis/redis-doc/blob/master//docs/management/security/acl.md | master | redis | [
-0.06877024471759796,
0.005499407649040222,
-0.06512954831123352,
0.0665353462100029,
-0.003560529323294759,
-0.06349289417266846,
0.0928862914443016,
-0.018961558118462563,
-0.012991195544600487,
0.03459927812218666,
0.02576480433344841,
-0.08643506467342377,
0.041935812681913376,
-0.0287... | 0.016923 |
`+@all ~app1:\* (+@read ~app2:\*)`. This user has full access on `app1:\*` and readonly access on `app2:\*`. However, some commands support reading data from one key, doing some transformation, and storing it into another key. One such command is the `COPY` command, which copies the data from the source key into the de... | https://github.com/redis/redis-doc/blob/master//docs/management/security/acl.md | master | redis | [
-0.0801282748579979,
-0.0073227290995419025,
-0.07556919008493423,
-0.009334173984825611,
-0.0652286559343338,
-0.08451153337955475,
0.07431469112634659,
-0.0025708347093313932,
-0.01866333931684494,
0.0032172289211302996,
0.02713041566312313,
-0.05553549900650978,
0.09063880145549774,
0.0... | 0.013279 |
able to access the hashed password itself, by having full access to the Redis commands of a given server, or corrupting the system itself, you already have access to what the password is protecting: the Redis instance stability and the data it contains. For this reason, slowing down the password authentication, in orde... | https://github.com/redis/redis-doc/blob/master//docs/management/security/acl.md | master | redis | [
-0.05372361093759537,
-0.009161069989204407,
-0.15018324553966522,
-0.03212807700037956,
-0.03820464760065079,
-0.00046379672130569816,
0.011916639283299446,
0.014605097472667694,
0.00747534167021513,
-0.0012032614322379231,
-0.04817202314734459,
0.0760272815823555,
0.07670751959085464,
-0... | 0.009078 |
Pub/Sub, so the ACL rule would be the following (note: `AUTH` is not needed since it is always allowed): ACL SETUSER sentinel-user on >somepassword allchannels +multi +slaveof +ping +exec +subscribe +config|rewrite +role +publish +info +client|setname +client|kill +script|kill Redis replicas require the following comma... | https://github.com/redis/redis-doc/blob/master//docs/management/security/acl.md | master | redis | [
-0.06149233132600784,
-0.036566201597452164,
-0.1262132078409195,
-0.0071417405270040035,
-0.03261103108525276,
-0.01601443625986576,
0.01234686840325594,
-0.009703225456178188,
0.004372132010757923,
0.05828571319580078,
-0.050656795501708984,
-0.009014597162604332,
0.09655848145484924,
-0... | 0.060882 |
SSL/TLS is supported by Redis starting with version 6 as an optional feature that needs to be enabled at compile time. ## Getting Started ### Building To build with TLS support you'll need OpenSSL development libraries (e.g. `libssl-dev` on Debian/Ubuntu). Build Redis with the following command: ```sh make BUILD\_TLS=y... | https://github.com/redis/redis-doc/blob/master//docs/management/security/encryption.md | master | redis | [
-0.05177433788776398,
0.0065810708329081535,
-0.10496105253696442,
0.02113611437380314,
-0.04093208163976669,
-0.07976844906806946,
-0.04010918736457825,
0.002885035704821348,
0.03960636630654335,
-0.032045282423496246,
-0.0037303417921066284,
-0.07412280142307281,
0.06769073009490967,
0.0... | 0.01789 |
instance (for more information refer to this [discussion](https://github.com/redis/redis/issues/7595)). ### Limitations I/O threading is currently not supported with TLS. | https://github.com/redis/redis-doc/blob/master//docs/management/security/encryption.md | master | redis | [
-0.08977141976356506,
-0.0538630373775959,
-0.05055641755461693,
0.003983269911259413,
-0.03169380873441696,
-0.107783243060112,
-0.006778882350772619,
-0.04298558831214905,
0.06966615468263626,
-0.0005392199964262545,
-0.022066310048103333,
0.0096870893612504,
0.03394654393196106,
-0.0148... | 0.059125 |
This document provides an introduction to the topic of security from the point of view of Redis. It covers the access control provided by Redis, code security concerns, attacks that can be triggered from the outside by selecting malicious inputs, and other similar topics. You can learn more about access control, data p... | https://github.com/redis/redis-doc/blob/master//docs/management/security/_index.md | master | redis | [
-0.09146689623594284,
-0.014173556119203568,
-0.1112416610121727,
-0.003137943334877491,
-0.021672368049621582,
-0.07603855431079865,
0.10210814327001572,
0.034139715135097504,
0.028989331796765327,
-0.037509985268116,
-0.0335594080388546,
0.07843370735645294,
0.10200520604848862,
-0.08932... | 0.14013 |
6, is via Access Control Lists, allowing named users to be created and assigned fine-grained permissions. Read more about Access Control Lists [here](/docs/management/security/acl/). The legacy authentication method is enabled by editing the \*\*redis.conf\*\* file, and providing a database password using the `requirep... | https://github.com/redis/redis-doc/blob/master//docs/management/security/_index.md | master | redis | [
-0.05997956916689873,
-0.0378454327583313,
-0.14445695281028748,
0.014515051618218422,
-0.050094738602638245,
0.0014539865078404546,
0.05757343769073486,
0.014340017922222614,
0.032093293964862823,
-0.02939058095216751,
-0.03332410007715225,
0.07529950141906738,
0.09055176377296448,
-0.064... | 0.11685 |
the algorithm is not randomized, so it is possible to trigger a quadratic worst-case behavior by carefully selecting the right set of inputs. ## String escaping and NoSQL injection The Redis protocol has no concept of string escaping, so injection is impossible under normal circumstances using a normal client library. ... | https://github.com/redis/redis-doc/blob/master//docs/management/security/_index.md | master | redis | [
-0.06232402101159096,
-0.004653833340853453,
-0.10348823666572571,
0.03430981561541557,
-0.03181504085659981,
-0.08900460600852966,
0.010183014906942844,
0.04328244924545288,
0.029346855357289314,
-0.012592139653861523,
0.0032285491470247507,
0.052610017359256744,
0.08564238995313644,
-0.0... | 0.062098 |
## Filling the performance checklist Redis is developed with a great emphasis on performance. We do our best with every release to make sure you'll experience a very stable and fast product. Nevertheless, if you're finding room to improve the efficiency of Redis or are pursuing a performance regression investigation yo... | https://github.com/redis/redis-doc/blob/master//docs/management/optimization/cpu-profiling.md | master | redis | [
0.02391098253428936,
-0.049371615052223206,
-0.10474368929862976,
0.01097539160400629,
0.026313351467251778,
-0.10895761102437973,
0.04315240681171417,
0.04156871512532234,
-0.05091355741024017,
-0.04433676227927208,
-0.09927605092525482,
0.036269258707761765,
-0.02270907536149025,
-0.0429... | 0.109014 |
Brendan Greg’s [FlameGraph repo](https://github.com/brendangregg/FlameGraph). We assume beforehand you have: - Installed the perf tool on your system. Most Linux distributions will likely package this as a package related to the kernel. More information about the perf tool can be found at perf [wiki](https://perf.wiki.... | https://github.com/redis/redis-doc/blob/master//docs/management/optimization/cpu-profiling.md | master | redis | [
-0.059898894280195236,
-0.03381255269050598,
-0.11413922905921936,
0.016268286854028702,
0.08584237098693848,
-0.0997299998998642,
0.005046010948717594,
0.005530118942260742,
-0.025270383805036545,
-0.033139973878860474,
-0.028519244864583015,
-0.0648883730173111,
-0.04671580716967583,
-0.... | 0.141512 |
information using Flame Graphs ## Call counts analysis with bcc/BPF A function may consume significant CPU cycles either because its code is slow or because it's frequently called. To answer at what rate functions are being called, you can rely upon call counts analysis using BCC's `funccount` tool: $ /usr/share/bcc/to... | https://github.com/redis/redis-doc/blob/master//docs/management/optimization/cpu-profiling.md | master | redis | [
-0.026287691667675972,
-0.06517947465181351,
-0.07943487167358398,
0.07423491030931473,
-0.02807227149605751,
-0.12257760018110275,
0.05772438645362854,
-0.013872343115508556,
0.0790320485830307,
-0.0066156876273453236,
-0.06541704386472702,
0.00920389499515295,
-0.04659593850374222,
-0.08... | 0.120593 |
Redis is often used for demanding use cases, where it serves a large number of queries per second per instance, but also has strict latency requirements for the average response time and the worst-case latency. While Redis is an in-memory system, it deals with the operating system in different ways, for example, in the... | https://github.com/redis/redis-doc/blob/master//docs/management/optimization/latency-monitor.md | master | redis | [
-0.02869180403649807,
-0.06216854974627495,
-0.07972653210163116,
0.042981479316949844,
0.015198208391666412,
-0.11145898699760437,
0.03686601296067238,
-0.008698002435266972,
0.13114599883556366,
-0.0012144066859036684,
-0.008640145882964134,
0.031265247613191605,
0.004159992095082998,
-0... | 0.231107 |
the `write(2)` system call when there is a pending fsync. \* `aof-write-active-child`: the `write(2)` system call when there are active child processes. \* `aof-write-alone`: the `write(2)` system call when no pending fsync and no active child process. \* `aof-fstat`: the `fstat(2)` system call. \* `aof-rename`: the `r... | https://github.com/redis/redis-doc/blob/master//docs/management/optimization/latency-monitor.md | master | redis | [
-0.05628569796681404,
-0.030636576935648918,
-0.059081487357616425,
0.017726771533489227,
0.024892767891287804,
-0.14691662788391113,
0.009077473543584347,
0.034434281289577484,
0.10390486568212509,
0.0737195536494255,
0.05544918775558472,
0.05255233123898506,
-0.05928761139512062,
-0.0712... | 0.163645 |
This document will help you understand what the problem could be if you are experiencing latency problems with Redis. In this context \*latency\* is the maximum delay between the time a client issues a command and the time the reply to the command is received by the client. Usually Redis processing time is extremely lo... | https://github.com/redis/redis-doc/blob/master//docs/management/optimization/latency.md | master | redis | [
0.05827804282307625,
-0.03914603218436241,
-0.028490319848060608,
-0.011785028502345085,
0.008379833772778511,
-0.10537414252758026,
-0.058299269527196884,
0.008142661303281784,
0.06281331926584244,
0.013287175446748734,
-0.007156516425311565,
-0.03260345757007599,
-0.0023841504007577896,
... | 0.026025 |
and latency spikes. Latency baseline ---------------- There is a kind of latency that is inherently part of the environment where you run Redis, that is the latency provided by your operating system kernel and, if you are using virtualization, by the hypervisor you are using. While this latency can't be removed it is i... | https://github.com/redis/redis-doc/blob/master//docs/management/optimization/latency.md | master | redis | [
0.05100422725081444,
-0.0452270545065403,
-0.07409898936748505,
0.012404990382492542,
0.039189014583826065,
-0.1223493441939354,
0.001315436908043921,
0.0009037286508828402,
0.07864692807197571,
-0.043656472116708755,
0.009175078943371773,
-0.001065082848072052,
-0.013688226230442524,
-0.0... | 0.126725 |
caches, NUMA placement, etc ...). System induced latencies are significantly higher on a virtualized environment than on a physical machine. The consequence is even if Redis processes most commands in sub microsecond range, a client performing many roundtrips to the server will have to pay for these network and system ... | https://github.com/redis/redis-doc/blob/master//docs/management/optimization/latency.md | master | redis | [
0.021713271737098694,
-0.005050034262239933,
-0.07277349382638931,
0.014154979027807713,
-0.0927853062748909,
-0.09242931753396988,
-0.003204302629455924,
0.08184420317411423,
0.038181889802217484,
0.03865009546279907,
-0.027136778458952904,
0.0008362490334548056,
-0.028048094362020493,
-0... | 0.167904 |
like `SORT`, `LREM`, `SUNION` and others. For instance taking the intersection of two big sets can take a considerable amount of time. The algorithmic complexity of all commands is documented. A good practice is to systematically check it when using commands you are not familiar with. If you have latency concerns you s... | https://github.com/redis/redis-doc/blob/master//docs/management/optimization/latency.md | master | redis | [
0.03069913573563099,
-0.04356984794139862,
-0.07624350488185883,
0.02576379105448723,
-0.00003470064984867349,
-0.15713773667812347,
0.009040112607181072,
-0.015051130205392838,
0.03233687952160835,
0.031245149672031403,
-0.018384281545877457,
-0.014535253867506981,
0.0014838839415460825,
... | 0.151898 |
physical machine (Xeon @ 2.27Ghz)\*\* 6.9GB RSS forked into 62 milliseconds (9 milliseconds per GB). \* \*\*Linux VM on 6sync (KVM)\*\* 360 MB RSS forked in 8.2 milliseconds (23.3 milliseconds per GB). \* \*\*Linux VM on EC2, old instance types (Xen)\*\* 6.1GB RSS forked in 1460 milliseconds (239.3 milliseconds per GB)... | https://github.com/redis/redis-doc/blob/master//docs/management/optimization/latency.md | master | redis | [
0.08797893673181534,
-0.035334013402462006,
0.01496419869363308,
0.01526562962681055,
0.09033256024122238,
-0.08784604072570801,
-0.08326857537031174,
0.014482180587947369,
0.030377309769392014,
-0.026128636673092842,
0.013758007436990738,
-0.03278291970491409,
-0.01026985328644514,
-0.085... | 0.018572 |
to do is to checking the amount of Redis memory that is swapped on disk. In order to do so you need to obtain the Redis instance pid: $ redis-cli info | grep process\_id process\_id:5454 Now enter the /proc file system directory for this process: $ cd /proc/5454 Here you'll find a file called \*\*smaps\*\* that describ... | https://github.com/redis/redis-doc/blob/master//docs/management/optimization/latency.md | master | redis | [
-0.010201651602983475,
-0.028435591608285904,
-0.13553272187709808,
0.005975063424557447,
-0.025668395683169365,
-0.03978439047932625,
0.0430147722363472,
0.047242458909749985,
0.04387682303786278,
0.036801524460315704,
0.0013414372224360704,
0.061896003782749176,
0.03231177479028702,
-0.0... | 0.108558 |
is swapped so this is not going to create any problem at all. If instead a non trivial amount of the process memory is swapped on disk your latency problems are likely related to swapping. If this is the case with your Redis instance you can further verify it using the \*\*vmstat\*\* command: $ vmstat 1 procs ---------... | https://github.com/redis/redis-doc/blob/master//docs/management/optimization/latency.md | master | redis | [
0.0503888800740242,
-0.05759220942854881,
-0.11924335360527039,
0.036908820271492004,
-0.026511289179325104,
-0.1367635279893875,
0.028192972764372826,
0.050611045211553574,
0.006508192978799343,
-0.0009884765604510903,
0.0035990530159324408,
0.02156415767967701,
0.015994619578123093,
-0.0... | 0.075762 |
three different ways using the \*\*appendfsync\*\* configuration option (this setting can be modified at runtime using the \*\*CONFIG SET\*\* command). \* When appendfsync is set to the value of \*\*no\*\* Redis performs no fsync. In this configuration the only source of latency can be write(2). When this happens usual... | https://github.com/redis/redis-doc/blob/master//docs/management/optimization/latency.md | master | redis | [
0.0011770285200327635,
-0.05116705968976021,
-0.06522319465875626,
0.06774962693452835,
0.045683108270168304,
-0.13511556386947632,
-0.012348809279501438,
0.0023950105533003807,
0.10080352425575256,
0.03364057093858719,
0.0048752655275166035,
0.04469980672001839,
-0.01253882609307766,
-0.0... | 0.111909 |
is started every 100 milliseconds (10 times per second), and will do the following: + Sample `ACTIVE\_EXPIRE\_CYCLE\_LOOKUPS\_PER\_LOOP` keys, evicting all the keys already expired. + If the more than 25% of the keys were found expired, repeat. Given that `ACTIVE\_EXPIRE\_CYCLE\_LOOKUPS\_PER\_LOOP` is set to 20 by defa... | https://github.com/redis/redis-doc/blob/master//docs/management/optimization/latency.md | master | redis | [
-0.06576254218816757,
-0.031120363622903824,
-0.04935427010059357,
0.05590873211622238,
-0.0024829308968037367,
-0.11780674755573273,
0.032243721187114716,
-0.013985252939164639,
0.03764048591256142,
0.001410782104358077,
0.029561178758740425,
0.1080537810921669,
0.0488823838531971,
-0.126... | 0.084035 |
greater. The minimum configurable period is 200 milliseconds. When you are done with the software watchdog you can turn it off setting the `watchdog-period` parameter to 0. \*\*Important:\*\* remember to do this because keeping the instance with the watchdog turned on for a longer time than needed is generally not a go... | https://github.com/redis/redis-doc/blob/master//docs/management/optimization/latency.md | master | redis | [
0.006782262586057186,
-0.0421922393143177,
-0.05510624870657921,
-0.0022841321770101786,
0.04287963733077049,
0.03483262658119202,
-0.02435404434800148,
-0.010281148366630077,
0.0431051179766655,
-0.05072968080639839,
0.030204983428120613,
-0.015259576961398125,
0.01084358710795641,
-0.008... | 0.068857 |
## Special encoding of small aggregate data types Since Redis 2.2 many data types are optimized to use less space up to a certain size. Hashes, Lists, Sets composed of just integers, and Sorted Sets, when smaller than a given number of elements, and up to a maximum element size, are encoded in a very memory-efficient w... | https://github.com/redis/redis-doc/blob/master//docs/management/optimization/memory-optimization.md | master | redis | [
0.015041328966617584,
-0.0016275588423013687,
-0.08555196225643158,
0.03233930096030235,
-0.014876454137265682,
-0.07778850942850113,
0.005275425501167774,
0.03743646293878555,
0.019230958074331284,
0.012200091034173965,
-0.05585097521543503,
0.07156628370285034,
0.04951564595103264,
-0.03... | 0.081208 |
this is about. Basically it is possible to model a plain key-value store using Redis where values can just be just strings, which is not just more memory efficient than Redis plain keys but also much more memory efficient than memcached. Let's start with some facts: a few keys use a lot more memory than a single key co... | https://github.com/redis/redis-doc/blob/master//docs/management/optimization/memory-optimization.md | master | redis | [
-0.016457075253129005,
0.02906261757016182,
-0.07252363115549088,
0.010044634342193604,
-0.01391651201993227,
-0.10722732543945312,
-0.002768590347841382,
0.07263089716434479,
0.12694045901298523,
0.022395888343453407,
-0.012333478778600693,
0.10473458468914032,
0.04484964534640312,
-0.111... | 0.071863 |
schema every hash will have more or less 100 fields regardless of the number of objects we cached. This is because our objects will always end with a number and not a random string. In some way, the final number can be considered as a form of implicit pre-sharding. What about small numbers? Like object:2? We handle thi... | https://github.com/redis/redis-doc/blob/master//docs/management/optimization/memory-optimization.md | master | redis | [
0.06539331376552582,
0.03614451363682747,
-0.07742398977279663,
0.0044694277457892895,
-0.045860808342695236,
-0.05143364891409874,
0.008069374598562717,
0.008531785570085049,
0.045752596110105515,
0.021022282540798187,
-0.04094112664461136,
0.10778609663248062,
0.023306353017687798,
-0.07... | 0.035979 |
of data, the Resident Set Size (also known as the RSS, which is the number of memory pages consumed by the process) will probably still be around 5GB, even if Redis will claim that the user memory is around 3GB. This happens because the underlying allocator can't easily release the memory. For example, often most of th... | https://github.com/redis/redis-doc/blob/master//docs/management/optimization/memory-optimization.md | master | redis | [
-0.012581750750541687,
-0.05762961134314537,
-0.07785677164793015,
0.035809922963380814,
0.03515045344829559,
-0.01893058978021145,
0.045749321579933167,
0.042140599340200424,
-0.0017224992625415325,
0.07251480221748352,
0.056900009512901306,
0.06776249408721924,
0.03384796902537346,
-0.06... | 0.122428 |
Redis includes the `redis-benchmark` utility that simulates running commands done by N clients while at the same time sending M total queries. The utility provides a default set of tests, or you can supply a custom set of tests. The following options are supported: Usage: redis-benchmark [-h ] [-p ] [-c ] [-n [-k ] -h ... | https://github.com/redis/redis-doc/blob/master//docs/management/optimization/benchmarks/index.md | master | redis | [
-0.0164323803037405,
-0.07326903194189072,
-0.11230071634054184,
0.09683854132890701,
-0.08927213400602341,
-0.13331373035907745,
-0.01275893859565258,
0.002461867406964302,
-0.00470005813986063,
0.03211214393377304,
-0.052715010941028595,
0.003426606534048915,
0.05508347228169441,
-0.0848... | 0.114505 |
read each command from every client. Also RTT is paid as well. Redis supports [pipelining](/topics/pipelining), so it is possible to send multiple commands at once, a feature often exploited by real world applications. Redis pipelining is able to dramatically improve the number of operations per second a server is able... | https://github.com/redis/redis-doc/blob/master//docs/management/optimization/benchmarks/index.md | master | redis | [
-0.037688955664634705,
-0.027097424492239952,
-0.0676177442073822,
0.04145728051662445,
-0.02497059665620327,
-0.11329109966754913,
-0.025920070707798004,
0.08188793808221817,
0.05188450589776039,
0.014352760277688503,
-0.07657693326473236,
0.029083728790283203,
-0.0144280344247818,
-0.015... | 0.129001 |
behavior since a lot of Redis based applications actively use pipelining to improve performance. However you should use a pipeline size that is more or less the average pipeline length you'll be able to use in your application in order to get realistic numbers. The benchmark should apply the same operations, and work i... | https://github.com/redis/redis-doc/blob/master//docs/management/optimization/benchmarks/index.md | master | redis | [
-0.01748136430978775,
-0.026491744443774223,
-0.06954362988471985,
0.02039884403347969,
-0.08713790029287338,
-0.13797372579574585,
-0.05573960393667221,
0.08095566183328629,
0.040688250213861465,
-0.04265645518898964,
-0.07183397561311722,
0.042497433722019196,
-0.000915228680241853,
-0.0... | 0.065227 |
of the serious performance issues you may incur in virtualized environments are due to over-provisioning, non-local disks with high latency, or old hypervisor software that have slow `fork` syscall implementation. + When the server and client benchmark programs run on the same box, both the TCP/IP loopback and unix dom... | https://github.com/redis/redis-doc/blob/master//docs/management/optimization/benchmarks/index.md | master | redis | [
0.024088812991976738,
-0.01649969257414341,
-0.04347718507051468,
-0.011389323510229588,
-0.038513846695423126,
-0.09579432755708694,
-0.048979438841342926,
0.041826166212558746,
0.05428966507315636,
0.004722456447780132,
-0.05409282073378563,
0.05975699424743652,
-0.012089837342500687,
-0... | 0.047246 |
it is not possible, then the system must be monitored to check the benchmark is not impacted by some external activity. + Some configurations (desktops and laptops for sure, some servers as well) have a variable CPU core frequency mechanism. The policy controlling this mechanism can be set at the OS level. Some CPU mod... | https://github.com/redis/redis-doc/blob/master//docs/management/optimization/benchmarks/index.md | master | redis | [
0.05353425815701485,
-0.04343681409955025,
-0.13412901759147644,
0.035148799419403076,
-0.027967918664216995,
-0.08461734652519226,
-0.044266194105148315,
0.016607247292995453,
-0.01910616084933281,
0.02801624871790409,
-0.054586004465818405,
0.023320110514760017,
0.04838602989912033,
-0.0... | 0.073395 |
\* Redis is source-available software, available under the terms of the RSALv2 and SSPLv1 licenses. Most of the Redis source code was written and is copyrighted by Salvatore Sanfilippo and Pieter Noordhuis. A list of other contributors can be found in the git history. The Redis trademark and logo are owned by Redis Ltd... | https://github.com/redis/redis-doc/blob/master//docs/about/license.md | master | redis | [
-0.07641635090112686,
-0.11186637729406357,
-0.12548936903476715,
-0.011453744024038315,
-0.01614934392273426,
-0.04552173614501953,
-0.04405491426587105,
0.029709527269005775,
0.08013106137514114,
-0.07584989070892334,
-0.034457460045814514,
0.0800493136048317,
0.020293572917580605,
-0.03... | 0.218949 |
is not licensed, and your licenses will automatically terminate. If the licensor provides you with a notice of your violation, and you cease all violations of this license no later than 30 days after you receive that notice, your licenses will be reinstated retroactively. However, if you violate these terms after such ... | https://github.com/redis/redis-doc/blob/master//docs/about/license.md | master | redis | [
-0.09776102751493454,
-0.0018868254264816642,
0.0341997854411602,
-0.07628294080495834,
0.03901771456003189,
0.028078939765691757,
0.05439592897891998,
-0.07123644649982452,
0.03692205250263214,
-0.0030307548586279154,
0.05226748809218407,
0.07876342535018921,
0.003990605007857084,
-0.0526... | 0.142118 |
Redis is system software and a type of system software that holds user data, so it is among the most critical pieces of a software stack. For this reason, Redis' release cycle is such that it ensures highly-stable releases, even at the cost of slower cycles. New releases are published in the [Redis GitHub repository](h... | https://github.com/redis/redis-doc/blob/master//docs/about/releases.md | master | redis | [
-0.03562484309077263,
-0.08590780943632126,
-0.04790696129202843,
0.0017328397370874882,
0.05996817350387573,
-0.0993872657418251,
-0.02954472042620182,
0.035480815917253494,
0.03549429774284363,
0.02226368337869644,
-0.024958645924925804,
0.0950363427400589,
0.018613265827298164,
-0.09946... | 0.171617 |
is planned for release once a year. Generally, every major release is followed by a minor version after six months. Patches are released as needed to fix high-urgency issues, or once a stable version accumulates enough fixes to justify it. For contacting the core team on sensitive matters and security issues, please em... | https://github.com/redis/redis-doc/blob/master//docs/about/releases.md | master | redis | [
-0.022807899862527847,
-0.057672929018735886,
-0.011967398226261139,
-0.02754763700067997,
0.028805742040276527,
-0.06039419397711754,
-0.07577094435691833,
0.020939284935593605,
-0.012777733616530895,
0.0010537647176533937,
-0.00017874367767944932,
0.09516642987728119,
-0.006672240328043699... | 0.100482 |
A list of well known companies using Redis: \* [Twitter](https://www.infoq.com/presentations/Real-Time-Delivery-Twitter) \* [GitHub](https://github.com/blog/530-how-we-made-github-fast) \* [Snapchat](https://twitter.com/robustcloud/status/448503100056535040) \* [Craigslist](https://blog.zawodny.com/2011/02/26/redis-sha... | https://github.com/redis/redis-doc/blob/master//docs/about/users.md | master | redis | [
-0.11019675433635712,
-0.10498720407485962,
-0.05866529792547226,
0.007397256325930357,
0.03252458572387695,
-0.10207215696573257,
0.02967131696641445,
-0.04855713993310928,
0.006343083456158638,
-0.028096212074160576,
0.02496926486492157,
0.06462240219116211,
0.06991396099328995,
-0.00915... | 0.162344 |
Redis is an open source (BSD licensed), in-memory \_\_data structure store\_\_ used as a database, cache, message broker, and streaming engine. > Future releases of Redis will be dual-licensed under a source-available license. You can choose between the [Redis Source Available License 2.0 (RSALv2)](/docs/about/license)... | https://github.com/redis/redis-doc/blob/master//docs/about/_index.md | master | redis | [
-0.02478569932281971,
-0.04816431552171707,
-0.11625070124864578,
-0.011849666945636272,
-0.013608381152153015,
-0.07368291169404984,
0.0002817763015627861,
0.017734207212924957,
0.014841080643236637,
-0.001615958521142602,
-0.03274523466825485,
0.08009808510541916,
0.04260377958416939,
-0... | 0.147605 |
Redis keys are binary safe; this means that you can use any binary sequence as a key, from a string like "foo" to the content of a JPEG file. The empty string is also a valid key. A few other rules about keys: \* Very long keys are not a good idea. For instance a key of 1024 bytes is a bad idea not only memory-wise, bu... | https://github.com/redis/redis-doc/blob/master//docs/manual/keyspace.md | master | redis | [
-0.018877197057008743,
0.011534025892615318,
-0.0976446121931076,
-0.023981651291251183,
-0.04508594051003456,
-0.02412303164601326,
0.02262081950902939,
0.07005085051059723,
0.029532868415117264,
-0.0038918163627386093,
0.03422446921467781,
0.049762383103370667,
0.09803662449121475,
-0.07... | 0.08756 |
key vanished between the two `GET` calls, since the second call was delayed more than 5 seconds. In the example above we used `EXPIRE` in order to set the expire (it can also be used in order to set a different expire to a key already having one, like `PERSIST` can be used in order to remove the expire and make the key... | https://github.com/redis/redis-doc/blob/master//docs/manual/keyspace.md | master | redis | [
-0.0454971045255661,
-0.023592308163642883,
-0.09627192467451096,
0.051568932831287384,
-0.07137133181095123,
-0.06426478922367096,
0.0102956248447299,
0.03663882613182068,
0.10274072736501694,
-0.00936209224164486,
0.10211529582738876,
0.07116417586803436,
0.028952080756425858,
-0.0660258... | 0.067073 |
Keyspace notifications allow clients to subscribe to Pub/Sub channels in order to receive events affecting the Redis data set in some way. Examples of events that can be received are: \* All the commands affecting a given key. \* All the keys receiving an LPUSH operation. \* All the keys expiring in the database 0. Not... | https://github.com/redis/redis-doc/blob/master//docs/manual/keyspace-notifications.md | master | redis | [
0.0027985749766230583,
-0.13115327060222626,
-0.01337351743131876,
0.05162728205323219,
-0.002924520056694746,
-0.046527981758117676,
0.09828939288854599,
-0.03874298185110092,
0.12168128043413162,
0.02949879877269268,
-0.002661541337147355,
0.03313561901450157,
0.07017296552658081,
-0.047... | 0.140879 |
a `move\_from` event for the source key, and a `move\_to` event for the destination key. \* `COPY` generates a `copy\_to` event. \* `MIGRATE` generates a `del` event if the source key is removed. \* `RESTORE` generates a `restore` event for the key. \* `EXPIRE` and all its variants (`PEXPIRE`, `EXPIREAT`, `PEXPIREAT`) ... | https://github.com/redis/redis-doc/blob/master//docs/manual/keyspace-notifications.md | master | redis | [
-0.09879569709300995,
-0.027825525030493736,
0.0231893640011549,
0.020846931263804436,
0.04340411722660065,
-0.021019773557782173,
0.06684146821498871,
-0.030583888292312622,
0.14529019594192505,
0.049746062606573105,
0.10513228178024292,
0.0537763386964798,
0.023150429129600525,
-0.084171... | 0.153596 |
generates an `spop` event, and an additional `del` event if the resulting set is empty and the key is removed. \* `SINTERSTORE`, `SUNIONSTORE`, `SDIFFSTORE` generate `sinterstore`, `sunionstore`, `sdiffstore` events respectively. In the special case the resulting set is empty, and the key where the result is stored alr... | https://github.com/redis/redis-doc/blob/master//docs/manual/keyspace-notifications.md | master | redis | [
-0.11810934543609619,
0.0462949313223362,
-0.021711263805627823,
0.037964653223752975,
0.011804853565990925,
-0.06801383942365646,
0.09404902905225754,
-0.04242172837257385,
0.11865299940109253,
0.018660228699445724,
0.08750161528587341,
-0.023132480680942535,
0.1296718418598175,
-0.087952... | 0.09521 |
as a result there are no guarantees that the Redis server will be able to generate the `expired` event at the time the key time to live reaches the value of zero. If no command targets the key constantly, and there are many keys with a TTL associated, there can be a significant delay between the time the key time to li... | https://github.com/redis/redis-doc/blob/master//docs/manual/keyspace-notifications.md | master | redis | [
-0.018346602097153664,
-0.052643440663814545,
-0.0325712226331234,
0.06451500952243805,
0.02453233115375042,
-0.02735207974910736,
-0.004226659424602985,
-0.05004630237817764,
0.13686524331569672,
0.020388849079608917,
0.03634161874651909,
0.03288259729743004,
0.057377301156520844,
-0.0503... | 0.079039 |
Client-side caching is a technique used to create high performance services. It exploits the memory available on application servers, servers that are usually distinct computers compared to the database nodes, to store some subset of the database information directly in the application side. Normally when data is requi... | https://github.com/redis/redis-doc/blob/master//docs/manual/client-side-caching.md | master | redis | [
-0.047868046909570694,
0.05521098151803017,
-0.04469013214111328,
0.029680512845516205,
-0.08132872730493546,
-0.049901362508535385,
0.11655084043741226,
-0.012562969699501991,
0.0816565603017807,
0.029918823391199112,
-0.04149544984102249,
0.07394067198038101,
0.11220436543226242,
-0.0850... | 0.106611 |
this command. Regardless of what schema is used, there is a simple fact: many very large applications implement some form of client-side caching, because it is the next logical step to having a fast store or a fast cache server. For this reason Redis 6 implements direct support for client-side caching, in order to make... | https://github.com/redis/redis-doc/blob/master//docs/manual/client-side-caching.md | master | redis | [
0.003669165773317218,
-0.027157695963978767,
-0.0791684165596962,
0.03988855332136154,
0.02911704033613205,
-0.07477013766765594,
0.07186684012413025,
-0.021527601405978203,
0.09780373424291611,
0.03389369323849678,
-0.010036819614470005,
0.0660640075802803,
0.025481747463345528,
-0.068277... | 0.201857 |
clients' structures, that would force a garbage collection procedure when the client disconnects: instead what we do is just store client IDs (each Redis client has a unique numerical ID). If a client disconnects, the information will be incrementally garbage collected as caching slots are invalidated. \* There is a si... | https://github.com/redis/redis-doc/blob/master//docs/manual/client-side-caching.md | master | redis | [
-0.028499918058514595,
-0.015400857664644718,
-0.05364847183227539,
0.043737344443798065,
-0.0510549321770668,
-0.08620608597993851,
0.08317871391773224,
-0.02678314596414566,
0.09961502999067307,
0.004830510355532169,
-0.04252784699201584,
0.10560014843940735,
0.06972108036279678,
-0.0531... | 0.139374 |
in order to read the invalidation messages, is that using Pub/Sub is entirely a trick \*\*in order to reuse old client implementations\*\*, but actually the message is not really sent to a channel and received by all the clients subscribed to it. Only the connection we specified in the `REDIRECT` argument of the `CLIEN... | https://github.com/redis/redis-doc/blob/master//docs/manual/client-side-caching.md | master | redis | [
-0.059982798993587494,
-0.034637950360774994,
0.04169498011469841,
0.013552723452448845,
-0.006543702911585569,
-0.0756724551320076,
0.034918371587991714,
-0.0193912573158741,
0.05466550961136818,
0.031216779723763466,
-0.12398150563240051,
0.04061698168516159,
0.054081179201602936,
0.0343... | 0.103135 |
mode we have the following main behaviors: \* Clients enable client-side caching using the `BCAST` option, specifying one or more prefixes using the `PREFIX` option. For instance: `CLIENT TRACKING on REDIRECT 10 BCAST PREFIX object: PREFIX user:`. If no prefix is specified at all, the prefix is assumed to be the empty ... | https://github.com/redis/redis-doc/blob/master//docs/manual/client-side-caching.md | master | redis | [
-0.07423403859138489,
-0.038022566586732864,
0.03805386647582054,
0.02773449197411537,
-0.10210365802049637,
-0.08177162706851959,
0.055836938321590424,
-0.04143188148736954,
0.02317984588444233,
0.0009916272247210145,
-0.043166860938072205,
-0.01168475579470396,
0.11485949158668518,
-0.02... | 0.06461 |
[D] server -> client: "bar" (the reply of "GET foo") Client cache: don't set "bar" since the entry for "foo" is missing. Such a race condition is not possible when using a single connection for both data and invalidation messages, since the order of the messages is always known in that case. ## What to do when losing c... | https://github.com/redis/redis-doc/blob/master//docs/manual/client-side-caching.md | master | redis | [
-0.04253872483968735,
-0.028160786256194115,
0.041601382195949554,
0.022482343018054962,
-0.08854664117097855,
-0.0813128724694252,
0.0037380352150648832,
-0.03175821155309677,
0.06958159804344177,
0.059995800256729126,
-0.07508554309606552,
0.05266870558261871,
0.0214021448045969,
-0.0170... | 0.024463 |
This article describes the design and implementation of a [very simple Twitter clone](https://github.com/antirez/retwis) written using PHP with Redis as the only database. The programming community has traditionally considered key-value stores as a special purpose database that couldn't be used as a drop-in replacement... | https://github.com/redis/redis-doc/blob/master//docs/manual/patterns/twitter-clone.md | master | redis | [
-0.0555696114897728,
-0.019066136330366135,
-0.08496847003698349,
0.005305607803165913,
-0.05503286421298981,
-0.07438364624977112,
0.011532294563949108,
0.06898646056652069,
-0.0024558722507208586,
0.0019666673615574837,
0.00455093290656805,
0.05931594967842102,
0.126090869307518,
-0.0587... | 0.158328 |
this way will work as long as there is only one client working with the key \_foo\_ at one time. See what happens if two clients are accessing this key at the same time: x = GET foo (yields 10) y = GET foo (yields 10) x = x + 1 (x is now 11) y = y + 1 (y is now 11) SET foo x (foo is now 11) SET foo y (foo is now 11) So... | https://github.com/redis/redis-doc/blob/master//docs/manual/patterns/twitter-clone.md | master | redis | [
-0.10032594203948975,
0.013617551885545254,
-0.08839064091444016,
-0.012545770034193993,
-0.11764363199472427,
-0.046474844217300415,
0.08438004553318024,
0.03162091597914696,
0.08128754049539566,
-0.003471390577033162,
0.03748283162713051,
0.057927828282117844,
0.08507604897022247,
-0.066... | 0.163511 |
it is better to start introducing Sets first (which are a very useful data structure per se), and later Sorted Sets. There are more data types than just Lists. Redis also supports Sets, which are unsorted collections of elements. It is possible to add, remove, and test for existence of members, and perform the intersec... | https://github.com/redis/redis-doc/blob/master//docs/manual/patterns/twitter-clone.md | master | redis | [
0.017889244481921196,
-0.02065686136484146,
-0.02779267355799675,
0.028402352705597878,
-0.0481533445417881,
-0.0584004670381546,
0.06558547914028168,
-0.019709883257746696,
-0.01932639814913273,
0.00683178985491395,
0.005439606960862875,
-0.007715287618339062,
0.07309726625680923,
-0.0721... | 0.0902 |
set fields in the hash, that can be retrieved with `HGET` later. It is possible to check if a field exists with `HEXISTS`, or to increment a hash field with `HINCRBY` and so forth. Hashes are the ideal data structure to represent \*objects\*. For example we use Hashes in order to represent Users and Updates in our Twit... | https://github.com/redis/redis-doc/blob/master//docs/manual/patterns/twitter-clone.md | master | redis | [
-0.0395529568195343,
0.06976018846035004,
-0.11446551978588104,
-0.04023008793592453,
-0.015681415796279907,
-0.06981757283210754,
0.04659217968583107,
0.010425472632050514,
0.011668787337839603,
0.012111419811844826,
0.013505810871720314,
0.043380629271268845,
0.07320237904787064,
-0.1118... | 0.04601 |
need in our system. A user might have users who follow them, which we'll call their followers. A user might follow other users, which we'll call a following. We have a perfect data structure for this. That is... Sets. The uniqueness of Sets elements, and the fact we can test in constant time for existence, are two inte... | https://github.com/redis/redis-doc/blob/master//docs/manual/patterns/twitter-clone.md | master | redis | [
-0.06699760258197784,
-0.023328997194767,
-0.05484004691243172,
-0.015151108615100384,
-0.052950743585824966,
0.024698980152606964,
0.04668732360005379,
0.008610527031123638,
0.03028954565525055,
0.005224752239882946,
0.03226067125797272,
0.038128484040498734,
0.10878314077854156,
-0.03978... | 0.066645 |
message. \* Ok authenticated! Set "fea5e81ac8ca77622bed1c2132a021f9" (the value of user:1000 `auth` field) as the "auth" cookie. This is the actual code: include("retwis.php"); # Form sanity checks if (!gt("username") || !gt("password")) goback("You need to enter both username and password to login."); # The form is ok... | https://github.com/redis/redis-doc/blob/master//docs/manual/patterns/twitter-clone.md | master | redis | [
-0.017948804423213005,
-0.016113517805933952,
-0.12957972288131714,
-0.009731396101415157,
-0.028691302984952927,
0.012381336651742458,
0.053635209798812866,
0.010996658354997635,
-0.013726188801229,
-0.04798797145485878,
0.019163914024829865,
-0.01985786110162735,
0.060517072677612305,
-0... | 0.032034 |
body of the post, which is, the actual status message. After we create a post and we obtain the post ID, we need to LPUSH the ID in the timeline of every user that is following the author of the post, and of course in the list of posts of the author itself (everybody is virtually following herself/himself). This is the... | https://github.com/redis/redis-doc/blob/master//docs/manual/patterns/twitter-clone.md | master | redis | [
0.03431500867009163,
0.0433548241853714,
-0.06285464018583298,
-0.012631463818252087,
0.020177947357296944,
0.010868651792407036,
0.02827823907136917,
-0.008562348783016205,
0.03935038298368454,
-0.04838785156607628,
0.04498540982604027,
0.0009650788269937038,
0.01986371912062168,
-0.05070... | 0.08484 |
follower relationship. We just need to `ZADD` calls: ZADD following:1000 5000 ZADD followers:5000 1000 Note the same pattern again and again. In theory with a relational database, the list of following and followers would be contained in a single table with fields like `following\_id` and `follower\_id`. You can extrac... | https://github.com/redis/redis-doc/blob/master//docs/manual/patterns/twitter-clone.md | master | redis | [
-0.04905617982149124,
0.0068979691714048386,
-0.11288576573133469,
-0.004793154075741768,
-0.06280730664730072,
-0.01938312128186226,
0.03693185746669769,
-0.008580916561186314,
0.0486694872379303,
-0.0033818967640399933,
0.07531506568193436,
0.011993504129350185,
0.16452044248580933,
-0.0... | 0.041875 |
Distributed locks are a very useful primitive in many environments where different processes must operate with shared resources in a mutually exclusive way. There are a number of libraries and blog posts describing how to implement a DLM (Distributed Lock Manager) with Redis, but every library uses a different approach... | https://github.com/redis/redis-doc/blob/master//docs/manual/patterns/distributed-locks.md | master | redis | [
-0.11510798335075378,
-0.0425490103662014,
-0.051987189799547195,
-0.017813825979828835,
-0.030461197718977928,
-0.018708519637584686,
0.021336575970053673,
-0.04522878676652908,
0.0050275069661438465,
0.04281244054436684,
-0.030235478654503822,
0.05490907281637192,
0.016352597624063492,
-... | 0.135721 |
gets promoted to master. 4. Client B acquires the lock to the same resource A already holds a lock for. \*\*SAFETY VIOLATION!\*\* Sometimes it is perfectly fine that, under special circumstances, for example during a failure, multiple clients can hold the lock at the same time. If this is the case, you can use your rep... | https://github.com/redis/redis-doc/blob/master//docs/manual/patterns/distributed-locks.md | master | redis | [
-0.10037028789520264,
-0.02299121581017971,
0.0024010108318179846,
-0.029088113456964493,
-0.046302493661642075,
0.009340477176010609,
0.07739688456058502,
-0.08304538577795029,
0.03374472260475159,
0.04166031256318092,
-0.011643685400485992,
0.009440090507268906,
0.14035440981388092,
-0.0... | -0.006466 |
system where we don’t have such guarantees. ## The Redlock Algorithm In the distributed version of the algorithm we assume we have N Redis masters. Those nodes are totally independent, so we don’t use replication or any other implicit coordination system. We already described how to acquire and release the lock safely ... | https://github.com/redis/redis-doc/blob/master//docs/manual/patterns/distributed-locks.md | master | redis | [
-0.07638978958129883,
-0.031581249088048935,
-0.040612660348415375,
0.010587528347969055,
0.010946745984256268,
-0.019622405990958214,
-0.004213398322463036,
-0.04837781563401222,
0.07328908890485764,
0.029176460579037666,
0.00020298892923165113,
0.06379932165145874,
0.05078870803117752,
-... | 0.092033 |
the lock, it should try again after a random delay in order to try to desynchronize multiple clients trying to acquire the lock for the same resource at the same time (this may result in a split brain condition where nobody wins). Also the faster a client tries to acquire the lock in the majority of Redis instances, th... | https://github.com/redis/redis-doc/blob/master//docs/manual/patterns/distributed-locks.md | master | redis | [
-0.07912877202033997,
-0.05116700381040573,
-0.03296662122011185,
0.00480100279673934,
-0.001445857109501958,
-0.00321242050267756,
0.02971663698554039,
-0.06359472870826721,
0.07193857431411743,
0.012705921195447445,
0.010721534490585327,
0.07788490504026413,
0.02492433786392212,
-0.07660... | 0.076826 |
The system liveness is based on three main features: 1. The auto release of the lock (since keys expire): eventually keys are available again to be locked. 2. The fact that clients, usually, will cooperate removing the locks when the lock was not acquired, or when the lock was acquired and the work terminated, making i... | https://github.com/redis/redis-doc/blob/master//docs/manual/patterns/distributed-locks.md | master | redis | [
-0.07478491961956024,
-0.047656890004873276,
-0.03080660291016102,
0.03410176932811737,
0.03288016840815544,
-0.008025300689041615,
0.01333854254335165,
-0.012936951592564583,
0.13615064322948456,
0.05151456221938133,
0.00467844819650054,
0.14242896437644958,
-0.0001145021669799462,
-0.033... | 0.05935 |
guarantee this we just need to make an instance, after a crash, unavailable for at least a bit more than the max `TTL` we use. This is the time needed for all the keys about the locks that existed when the instance crashed to become invalid and be automatically released. Using \*delayed restarts\* it is basically possi... | https://github.com/redis/redis-doc/blob/master//docs/manual/patterns/distributed-locks.md | master | redis | [
-0.11344043910503387,
-0.036546479910612106,
-0.01275124866515398,
-0.019190654158592224,
-0.03352813050150871,
-0.00029464310500770807,
0.024941924959421158,
0.020043697208166122,
0.07055330276489258,
0.04298032820224762,
0.0012131386902183294,
0.0932602658867836,
0.019629158079624176,
-0... | 0.06963 |
Bulk loading is the process of loading Redis with a large amount of pre-existing data. Ideally, you want to perform this operation quickly and efficiently. This document describes some strategies for bulk loading data in Redis. ## Bulk loading using the Redis protocol Using a normal Redis client to perform bulk loading... | https://github.com/redis/redis-doc/blob/master//docs/manual/patterns/bulk-loading.md | master | redis | [
-0.04932612180709839,
-0.048947472125291824,
-0.07242812216281891,
0.03026680462062359,
-0.057889778167009354,
-0.11608707904815674,
0.0216267891228199,
0.03426147252321243,
0.01954844780266285,
0.029690302908420563,
-0.0015193037688732147,
0.0401608981192112,
0.03418397530913353,
-0.06821... | 0.107901 |
above function it is possible to easily generate the key value pairs in the above example, with this program: (0...1000).each{|n| STDOUT.write(gen\_redis\_proto("SET","Key#{n}","Value#{n}")) } We can run the program directly in pipe to redis-cli in order to perform our first mass import session. $ ruby proto.rb | redis... | https://github.com/redis/redis-doc/blob/master//docs/manual/patterns/bulk-loading.md | master | redis | [
-0.01923207938671112,
-0.001446290174499154,
-0.10135883092880249,
0.0262131504714489,
-0.08496928960084915,
-0.06584162265062332,
0.03683710843324661,
0.03487924486398697,
0.0011955380905419588,
-0.027272086590528488,
-0.045561932027339935,
-0.01811632700264454,
0.03406831622123718,
-0.07... | 0.055794 |
Redis is not exactly a key-value store, since values can be complex data structures. However it has an external key-value shell: at API level data is addressed by the key name. It is fair to say that, natively, Redis only offers \*primary key access\*. However since Redis is a data structures server, its capabilities c... | https://github.com/redis/redis-doc/blob/master//docs/manual/patterns/indexes/index.md | master | redis | [
-0.012840455397963524,
-0.01126725971698761,
-0.09591677784919739,
0.021400408819317818,
-0.06745761632919312,
-0.057213302701711655,
0.01820492185652256,
0.025038449093699455,
0.03689604252576828,
0.02900463156402111,
-0.029998643323779106,
0.054800476878881454,
0.07396382838487625,
-0.04... | 0.151755 |
to index some field of an object which is stored elsewhere. Instead of using the sorted set value directly to store the data associated with the indexed field, it is possible to store just the ID of the object. For example I may have Redis hashes representing users. Each user is represented by a single key, directly ac... | https://github.com/redis/redis-doc/blob/master//docs/manual/patterns/indexes/index.md | master | redis | [
0.013118124566972256,
0.15321098268032074,
-0.07655221968889236,
0.05595779046416283,
-0.04733375087380409,
0.058507148176431656,
0.09746932983398438,
0.04754774644970894,
0.0005735865561291575,
-0.04141777381300926,
-0.04110328108072281,
0.03854891285300255,
0.06449539959430695,
-0.053337... | 0.064298 |
values with different errors, because they use an exponential representation internally. However what is interesting for indexing purposes is that the score is always able to represent without any error numbers between -9007199254740992 and 9007199254740992, which is `-/+ 2^53`. When representing much larger numbers, y... | https://github.com/redis/redis-doc/blob/master//docs/manual/patterns/indexes/index.md | master | redis | [
-0.016766391694545746,
-0.00040463233017362654,
-0.046126000583171844,
0.010722676292061806,
-0.016624080017209053,
-0.04585679993033409,
0.013512423262000084,
0.10907354950904846,
0.0962911993265152,
0.009187531657516956,
-0.03145677223801613,
-0.004435303620994091,
0.10132908076047897,
0... | 0.149419 |
search query ever encountered. Then when we want to complete the user input, we execute a range query using `ZRANGE` with the `BYLEX` argument. Imagine the user is typing "bit" inside the search form, and we want to offer possible search keywords starting for "bit". We send Redis a command like that: ZRANGE myindex "[b... | https://github.com/redis/redis-doc/blob/master//docs/manual/patterns/indexes/index.md | master | redis | [
-0.01736619509756565,
0.03899373114109039,
-0.04680941253900528,
0.05371607467532158,
-0.051817115396261215,
0.003525722539052367,
0.1262882947921753,
0.054092034697532654,
-0.005970947444438934,
-0.04085897281765938,
-0.010120425373315811,
-0.003968772944062948,
0.15062224864959717,
-0.03... | 0.09783 |
will adapt automatically. A refinement to this algorithm is to pick entries in the list according to their weight: the higher the score, the less likely entries are picked in order to decrement its score, or evict them. Normalizing strings for case and accents --- In the completion examples we always used lowercase str... | https://github.com/redis/redis-doc/blob/master//docs/manual/patterns/indexes/index.md | master | redis | [
0.013015388511121273,
0.0389411561191082,
-0.010792376473546028,
0.024715343490242958,
-0.04437224566936493,
0.08633234351873398,
0.09136147052049637,
-0.0052887494675815105,
-0.0006635497556999326,
-0.049681950360536575,
0.0012948074145242572,
-0.007584706414490938,
0.12666425108909607,
0... | 0.146939 |
00324823481:foo ZADD myindex 0 12838349234:bar ZADD myindex 0 00000000111:zap ZRANGE myindex 0 -1 1) "00000000111:zap" 2) "00324823481:foo" 3) "12838349234:bar" We effectively created an index using a numerical field which can be as big as we want. This also works with floating point numbers of any precision by making ... | https://github.com/redis/redis-doc/blob/master//docs/manual/patterns/indexes/index.md | master | redis | [
0.028596043586730957,
0.03672002628445625,
-0.04741329699754715,
-0.029667332768440247,
-0.06228674203157425,
-0.06007646769285202,
0.04222441092133522,
0.031166596338152885,
0.006825629621744156,
0.0186129342764616,
-0.08468236029148102,
0.014186032116413116,
0.060912538319826126,
0.01735... | 0.05717 |
the operations of updating the index. In order to remove the old information we indexed for the object ID 90, regardless of the \*current\* fields values of the object, we just have to retrieve the hash value by object ID and `ZREM` it in the sorted set view. Representing and querying graphs using a hexastore === One c... | https://github.com/redis/redis-doc/blob/master//docs/manual/patterns/indexes/index.md | master | redis | [
0.016758359968662262,
0.0922454223036766,
-0.04268019273877144,
0.0448121540248394,
-0.05450836941599846,
0.045609284192323685,
0.04080212861299515,
-0.026369454339146614,
0.007844515144824982,
0.015064639039337635,
-0.021553609520196915,
0.06773494929075241,
0.04482842609286308,
-0.008231... | 0.125396 |
our coordinates. The max value of both variables is 400. In the next figure, the blue box represents our query. We want all the points where `x` is between 50 and 100, and where `y` is between 100 and 300.  In order to represent data that makes these kinds of queries fast to perform, ... | https://github.com/redis/redis-doc/blob/master//docs/manual/patterns/indexes/index.md | master | redis | [
-0.0011762555222958326,
0.033692821860313416,
-0.053942255675792694,
-0.026823069900274277,
0.012545710429549217,
0.04875468462705612,
0.0665181502699852,
0.014119628816843033,
0.03331046178936958,
-0.06199219450354576,
-0.05371839180588722,
0.06317193061113358,
0.07077831029891968,
0.0329... | 0.138427 |
between 200 and 203 (range=4) 6 bits: x between 72 and 79, y between 200 and 207 (range=8) 8 bits: x between 64 and 79, y between 192 and 207 (range=16) And so forth. Now we have definitely better granularity! As you can see substituting N bits from the index gives us search boxes of side `2^(N/2)`. So what we do is ch... | https://github.com/redis/redis-doc/blob/master//docs/manual/patterns/indexes/index.md | master | redis | [
0.0509396456182003,
0.08200890570878983,
-0.04270308464765549,
0.01647944003343582,
0.03373570367693901,
-0.0014123129658401012,
-0.02833545207977295,
0.003322828793898225,
-0.05658042058348656,
-0.03197808563709259,
-0.11390721797943115,
0.002499478170648217,
0.021411867812275887,
-0.0171... | 0.022814 |
numbers, the simplest approach is probably to convert them to integers by multiplying the integer for a power of ten proportional to the number of digits after the dot you want to retain. Non range indexes === So far we checked indexes which are useful to query by range or by single item. However other Redis data struc... | https://github.com/redis/redis-doc/blob/master//docs/manual/patterns/indexes/index.md | master | redis | [
-0.025239815935492516,
0.0013879073085263371,
-0.08964131027460098,
0.05395742878317833,
-0.007624091114848852,
-0.030736777931451797,
0.08197031915187836,
-0.015756458044052124,
0.024113383144140244,
0.011573807336390018,
-0.02993340790271759,
0.028635306283831596,
0.09669344872236252,
-0... | 0.162978 |
Redis pipelining is a technique for improving performance by issuing multiple commands at once without waiting for the response to each individual command. Pipelining is supported by most Redis clients. This document describes the problem that pipelining is designed to solve and how pipelining works in Redis. ## Reques... | https://github.com/redis/redis-doc/blob/master//docs/manual/pipelining/index.md | master | redis | [
-0.05832045152783394,
-0.0009275501361116767,
-0.04042929410934448,
0.03068295493721962,
-0.06595876812934875,
-0.12039823830127716,
-0.004860587418079376,
0.03472502902150154,
0.05959531292319298,
-0.0074737402610480785,
-0.0458562858402729,
0.03433895483613014,
-0.0053888168185949326,
-0... | 0.156567 |
\*Server:\* 3 \* \*Server:\* 4 > \*\*IMPORTANT NOTE\*\*: While the client sends commands using pipelining, the server will be forced to queue the replies, using memory. So if you need to send a lot of commands with pipelining, it is better to send them as batches each containing a reasonable number, for instance 10k co... | https://github.com/redis/redis-doc/blob/master//docs/manual/pipelining/index.md | master | redis | [
-0.010625154711306095,
-0.000710973225068301,
-0.03692837432026863,
0.019654035568237305,
-0.07595121115446091,
-0.10240593552589417,
-0.002374911680817604,
0.07666590809822083,
0.04907682165503502,
0.03090502694249153,
-0.03321879729628563,
0.023166848346590996,
-0.04961515963077545,
-0.0... | 0.084665 |
page, you may still wonder why a Redis benchmark like the following (in pseudo code), is slow even when executed in the loopback interface, when the server and the client are running in the same physical machine: ```sh FOR-ONE-SECOND: Redis.SET("foo","bar") END ``` After all, if both the Redis process and the benchmark... | https://github.com/redis/redis-doc/blob/master//docs/manual/pipelining/index.md | master | redis | [
0.0188165083527565,
-0.05812472477555275,
-0.09026898443698883,
0.08015568554401398,
0.0017186893383041024,
-0.0880977064371109,
-0.0089646577835083,
0.013046792708337307,
0.10452958196401596,
-0.052096519619226456,
-0.02528504654765129,
0.10483162850141525,
0.009147548116743565,
-0.103156... | 0.1205 |
In interactive mode, `redis-cli` has basic line editing capabilities to provide a familiar typing experience. To launch the program in special modes, you can use several options, including: \* Simulate a replica and print the replication stream it receives from the primary. \* Check the latency of a Redis server and di... | https://github.com/redis/redis-doc/blob/master//docs/connect/cli.md | master | redis | [
-0.024115504696965218,
-0.06179775670170784,
-0.12388251721858978,
0.00950063206255436,
-0.05195223540067673,
-0.09378980100154877,
0.04866645485162735,
0.013773123733699322,
0.07118682563304901,
-0.002389056608080864,
-0.012297622859477997,
-0.05526680126786232,
0.07257328927516937,
-0.04... | 0.171698 |
perform authentication saving the need of explicitly using the `AUTH` command: $ redis-cli -a myUnguessablePazzzzzword123 PING PONG \*\*NOTE:\*\* For security reasons, provide the password to `redis-cli` automatically via the `REDISCLI\_AUTH` environment variable. Finally, it's possible to send a command that operates ... | https://github.com/redis/redis-doc/blob/master//docs/connect/cli.md | master | redis | [
-0.007267476990818977,
0.0027002652641385794,
-0.13363786041736603,
-0.031771767884492874,
-0.10528013855218887,
-0.03451269119977951,
0.09628123790025711,
-0.020731842145323753,
0.015529579482972622,
0.037217773497104645,
-0.02494877204298973,
-0.040751468390226364,
0.10092633217573166,
-... | 0.050813 |
set to 0, so commands are just executed ASAP: $ redis-cli -r 5 INCR counter\_value (integer) 1 (integer) 2 (integer) 3 (integer) 4 (integer) 5 To run the same command indefinitely, use `-1` as the count value. To monitor over time the RSS memory size it's possible to use the following command: $ redis-cli -r -1 -i 1 IN... | https://github.com/redis/redis-doc/blob/master//docs/connect/cli.md | master | redis | [
0.01636514626443386,
-0.012263800017535686,
-0.1644161492586136,
0.061133310198783875,
-0.014929188415408134,
-0.08635424077510834,
0.05513395369052887,
0.01829732209444046,
0.05972565338015556,
0.03094078227877617,
0.014514687471091747,
-0.023218456655740738,
0.07641654461622238,
-0.04873... | 0.158825 |
can see the prompt changes accordingly when connecting to a different server instance. If a connection is attempted to an instance that is unreachable, the `redis-cli` goes into disconnected mode and attempts to reconnect with each new command: 127.0.0.1:6379> CONNECT 127.0.0.1 9999 Could not connect to Redis at 127.0.... | https://github.com/redis/redis-doc/blob/master//docs/connect/cli.md | master | redis | [
0.035929471254348755,
-0.05561660975217819,
-0.06263028830289841,
-0.01866624318063259,
0.0009865963365882635,
-0.09070822596549988,
0.029808448627591133,
-0.04556695744395256,
0.11262765526771545,
-0.04484634846448898,
0.018782449886202812,
-0.0011366193648427725,
0.03575751185417175,
0.0... | 0.06259 |
`@set` - `@sorted\_set` - `@hash` - `@pubsub` - `@transactions` - `@connection` - `@server` - `@scripting` - `@hyperloglog` - `@cluster` - `@geo` - `@stream` \* `HELP ` shows specific help for the command given as argument. For example in order to show help for the `PFADD` command, use: 127.0.0.1:6379> HELP PFADD PFADD... | https://github.com/redis/redis-doc/blob/master//docs/connect/cli.md | master | redis | [
0.03503258153796196,
-0.011440571397542953,
-0.0419955737888813,
0.012923786416649818,
0.011394945904612541,
-0.010083578526973724,
0.09181126207113266,
0.03720478340983391,
-0.036929354071617126,
0.023082224652171135,
0.036380402743816376,
0.003752906108275056,
0.004485776647925377,
0.060... | 0.122828 |
Biggest hash found so far 'myobject' with 3 fields -------- summary ------- Sampled 506 keys in the keyspace! Total key length in bytes is 3452 (avg len 6.82) Biggest string found 'counter:\_\_rand\_int\_\_' has 6 bytes Biggest list found 'mylist' has 100004 items Biggest hash found 'myobject' has 3 fields 504 strings ... | https://github.com/redis/redis-doc/blob/master//docs/connect/cli.md | master | redis | [
0.003376021748408675,
0.01147250086069107,
-0.07398974895477295,
0.003121649846434593,
-0.00035874522291123867,
-0.09698117524385452,
0.07715746760368347,
0.08597592264413834,
-0.0009476703125983477,
0.04711684212088585,
-0.026199979707598686,
0.04199705272912979,
0.0697329044342041,
-0.07... | 0.097333 |
'\*' Reading messages... (press Ctrl-C to quit) 1) "PSUBSCRIBE" 2) "\*" 3) (integer) 1 The \*reading messages\* message shows that we entered Pub/Sub mode. When another client publishes some message in some channel, such as with the command `redis-cli PUBLISH mychannel mymessage`, the CLI in Pub/Sub mode will show some... | https://github.com/redis/redis-doc/blob/master//docs/connect/cli.md | master | redis | [
0.06511305272579193,
-0.0414755754172802,
-0.09170754253864288,
0.012480080127716064,
0.02923785336315632,
-0.05207016319036484,
0.07448742538690567,
-0.008206676691770554,
0.04352134093642235,
0.01935034617781639,
-0.057410262525081635,
-0.02805672585964203,
0.05038690194487572,
0.0209844... | 0.101666 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.