{"id":6535,"date":"2022-09-13T09:44:37","date_gmt":"2022-09-13T02:44:37","guid":{"rendered":"https:\/\/www.briswell-vn.com\/?p=6535"},"modified":"2022-09-13T09:50:45","modified_gmt":"2022-09-13T02:50:45","slug":"redis-va-redis-stack","status":"publish","type":"post","link":"https:\/\/www.briswell-vn.com\/ja\/news\/redis-va-redis-stack\/","title":{"rendered":"Redis\u304a\u3088\u3073Redis Stack"},"content":{"rendered":"<p><\/p>\n<h2>\u521d\u3081\u306b<\/h2>\n<p>Redis\u306f<strong>Re<\/strong>mote <strong>Di<\/strong>ctionary <strong>S<\/strong>erver\u306e\u7565\u79f0\u3067\u3042\u308a\u3001NoSQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u7ba1\u7406\u30b7\u30b9\u30c6\u30e0\u306e\u4e00\u3064\u3067\u3059\u3002<\/p>\n<p>Redis\u306f\u9ad8\u6027\u80fd\u3067\u30e1\u30e2\u30ea\u4e0a\u306b\u30ad\u30fc\u30d0\u30ea\u30e5\u30fc\u578b\u306e\u30c7\u30fc\u30bf\u3092\u683c\u7d0d\u3059\u308b\u305f\u3081\u306b\u4f7f\u308f\u308c\u307e\u3059\u3002<\/p>\n<p>Redis\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3001\u30ad\u30e3\u30c3\u30b7\u30e5\u3001\u30e1\u30c3\u30bb\u30fc\u30b8\u30d6\u30ed\u30fc\u30ab\u30fc\u306a\u3069\u3068\u3057\u3066\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002\u51e6\u7406\u901f\u5ea6\u3092\u5411\u4e0a\u3055\u305b\u308b\u305f\u3081\u306b\u3001RAM\u306b\u683c\u7d0d\u3055\u308c\u305f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u3057\u3066\u4f7f\u7528\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>Redis\u306f\u30011\u30df\u30ea\u79d2\u672a\u6e80\u306e\u901f\u5ea6\u3067\u5fdc\u7b54\u6642\u9593\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002Redis\u3067\u306f\u3001RAM\u4e0a\u306b\u683c\u7d0d\u3059\u308b\u306e\u3067\u3001\u901f\u5ea6\u304c\u30cf\u30fc\u30c9\u30c7\u30a3\u30b9\u30af\u30c9\u30e9\u30a4\u30d6\u3078\u306e\u683c\u7d0d\u3088\u308a\u901f\u3044\u3067\u3059\u3002HDD\u3001SSD\u3078\u306e\u30a2\u30af\u30bb\u30b9\u306b\u6bd4\u3079\u308b\u3068\u3001\u305d\u308c\u305e\u308c\u3067\u3001\u7d04150,000\u500d\u3001\u7d04500\u500d\u901f\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u30de\u30a4\u30af\u30ed\u30b5\u30fc\u30d3\u30b9\u9593\u3068\u306e\u9023\u643a\u306b\u9069\u3057\u307e\u3059\u3002<\/p>\n<h3>\u57fa\u672c\u7279\u5fb4<\/h3>\n<h5>\u30c7\u30fc\u30bf\u30e2\u30c7\u30eb<\/h5>\n<p>Redis\u306f\u30c6\u30fc\u30d6\u30eb\u304c\u3042\u308a\u307e\u305b\u3093\u3002Redis\u306f\u30ad\u30fc\u30d0\u30ea\u30e5\u30fc\u5f62\u5f0f\u3067\u30c7\u30fc\u30bf\u3092\u4fdd\u5b58\u3057\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306bRedis\u306e\u30c7\u30fc\u30bf\u578b\u3092\u793a\u3057\u307e\u3059\u3002<\/p>\n<p><strong>STRING\u578b<\/strong>\uff1a\u6587\u5b57\u5217\u3067\u3042\u308a\u3001\u6574\u6570\u3067\u3082\u3042\u308a\u3001\u6d6e\u52d5\u5c0f\u6570\u70b9\u6570\u3067\u3082\u3042\u308a\u307e\u3059\u3002Redis\u306f\u3001\u6587\u5b57\u5217\u5168\u4f53\u307e\u305f\u306f\u6587\u5b57\u5217\u306e\u8981\u7d20\u3092\u51e6\u7406\u3067\u304d\u3001\u6574\u6570\u3084\u6d6e\u52d5\u5c0f\u6570\u70b9\u6570\u306e\u30a4\u30f3\u30af\u30ea\u30e1\u30f3\u30c8\u30fb\u30c7\u30af\u30ea\u30e1\u30f3\u30c8\u3092\u51e6\u7406\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><strong>LIST\u578b<\/strong>\uff1a\u6587\u5b57\u5217\u306e\u9023\u7d50\u30ea\u30b9\u30c8\u3067\u3059\u3002 Redis\u306f\u3001\u30ea\u30b9\u30c8\u306e\u4e21\u5074\u304b\u3089\u306e\u30d7\u30c3\u30b7\u30e5\u3001\u30dd\u30c3\u30d7\u3001\u30aa\u30d5\u30bb\u30c3\u30c8\u306b\u3088\u308b\u30c8\u30ea\u30df\u30f3\u30b0\u3001\u5358\u4e00\u307e\u305f\u306f\u8907\u6570\u306e\u30ea\u30b9\u30c8\u8981\u7d20\u306e\u8aad\u53d6\u3001\u5024\u306e\u63a2\u7d22\u3001\u524a\u9664\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002<\/p>\n<p><strong>SET\u578b<\/strong>\uff1a\u4e26\u3073\u66ff\u3048\u306a\u3044\u6587\u5b57\u5217\u306e\u96c6\u5408\u3067\u3059\u3002Redis\u306f\u3001\u8981\u7d20\u306e\u8ffd\u52a0\u30fb\u8aad\u53d6\u30fb\u524a\u9664\u3001\u304a\u3088\u3073\u3001\u8981\u7d20\u304c\u96c6\u5408\u306b\u5b58\u5728\u3059\u308b\u304b\u306e\u78ba\u8a8d\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002\u3055\u3089\u306b\u3001Redis\u306f\u3001intersect\u3001union\u3001difference\u3068\u3044\u3063\u305f\u96c6\u5408\u6f14\u7b97\u3082\u30b5\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002<\/p>\n<p><strong>HASH\u578b<\/strong>\uff1a\u5076\u7136\u306b\u4e26\u3073\u66ff\u3048\u308b\u30ad\u30fc\u3068\u5024\u306e\u30da\u30a2\u306e\u30cf\u30c3\u30b7\u30e5\u30c6\u30fc\u30d6\u30eb\u3092\u683c\u7d0d\u3057\u307e\u3059\u3002 Redis\u306f\u3001\u8981\u7d20\u306e\u8ffd\u52a0\u30fb\u8aad\u53d6\u30fb\u524a\u9664\u3001\u304a\u3088\u3073\u3001\u5168\u5024\u306e\u8aad\u53d6\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002<\/p>\n<p><strong>ZSET\u578b<\/strong>\uff08sorted set\uff09\uff1a\u8981\u7d20\u304c 1 \u3064\u306e\u6587\u5b57\u5217\uff08\u30e1\u30f3\u30d0\u30fc\uff09\u3068 1 \u3064\u306e\u6d6e\u52d5\u5c0f\u6570\u70b9\u6570\uff08\u30b9\u30b3\u30a2\uff09\u3068\u306e\u30de\u30c3\u30d7\u3067\u3042\u308b\u30ea\u30b9\u30c8\u3067\u3001\u3053\u306e\u30b9\u30b3\u30a2\u3067\u4e26\u3073\u66ff\u3048\u3089\u308c\u307e\u3059\u3002Redis\u306f\u3001\u8981\u7d20\u306e\u8ffd\u52a0\u30fb\u8aad\u53d6\u30fb\u524a\u9664\u3001\u304a\u3088\u3073\u3001\u6587\u5b57\u5217\u307e\u305f\u306f\u30b9\u30b3\u30a2\u306e\u30e9\u30f3\u30af\u306b\u3088\u308b\u8981\u7d20\u306e\u62bd\u51fa\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002<\/p>\n<h5>Replication \u2013 Persistence:<\/h5>\n<p>Redis\u306f\u3001\u30d7\u30e9\u30a4\u30de\u30ea\u30fb\u30ec\u30d7\u30ea\u30ab\u69cb\u6210\u3092\u4f7f\u3063\u3066\u3001\u30c7\u30fc\u30bf\u3092\u7570\u306a\u308b\u30b5\u30fc\u30d0\u30fc\u3078\u3068\u8907\u88fd\u3067\u304d\u308b\u3088\u3046\u306a\u975e\u540c\u671f\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u30ea\u30af\u30a8\u30b9\u30c8\u304c\u5404\u30b5\u30fc\u30d0\u30fc\u306e\u9593\u3067\u5206\u6563\u3055\u308c\u308b\u306e\u3067\u8aad\u307f\u53d6\u308b\u6027\u80fd\u304c\u3055\u308c\u3001\u30e1\u30a4\u30f3\u30b5\u30fc\u30d0\u30fc\u304c\u969c\u5bb3\u306b\u3088\u3063\u3066\u505c\u6b62\u3055\u308c\u305f\u5834\u5408\u3001\u8fc5\u901f\u306b\u5fa9\u65e7\u3067\u304d\u307e\u3059\u3002 \u6c38\u7d9a\u6027\u306b\u3064\u3044\u3066\u306f\u3001Redis\u306f\u30dd\u30a4\u30f3\u30c8\u30fb\u30a4\u30f3\u30fb\u30bf\u30a4\u30e0\u30fb\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\uff08\u3059\u306a\u308f\u3061\u3001Redis\u30c7\u30fc\u30bf\u3092\u30c7\u30a3\u30b9\u30af\u306b\u8907\u88fd\uff09\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002<\/p>\n<h5>In-Memory Data Store<\/h5>\n<p>Redis\u306f\u30c7\u30fc\u30bf\u3092RAM\u306b\u683c\u7d0d\u3059\u308b\u305f\u3081\u3001\u30c7\u30fc\u30bf\u306e\u8aad\u307f\u66f8\u304d\u306f\u30cf\u30fc\u30c9\u30c7\u30a3\u30b9\u30af\u30c9\u30e9\u30a4\u30d6\u3088\u308a\u3082\u306f\u308b\u304b\u306b\u9ad8\u901f\u3067\u3059<\/p>\n<p>\u305f\u3060\u3057\u3001\u3059\u3079\u3066\u306e\u30c7\u30fc\u30bf\u306fRAM\u4e0a\u306b\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u30b5\u30fc\u30d0\u30fc\u304c\u505c\u6b62\u3055\u308c\u305f\u3089\u3001\u7121\u304f\u306a\u308a\u307e\u3059\u304c\u3001\u305d\u306e\u5bfe\u7b56\u3068\u3057\u3066\u306f\u3001Redis Persistence\u3092\u4f7f\u3046\u3053\u3068\u3067\u5bfe\u5fdc\u3067\u304d\u307e\u3059\u3002<\/p>\n<h5>Persistent redis<\/h5>\n<p>Redis\u306f\u3001RAM\u4e0a\u306b\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u30ad\u30fc\u30d0\u30ea\u30e5\u30fc\u578b\u306e\u30c7\u30fc\u30bf\u3092\u52d5\u4f5c\u3057\u307e\u3059\u304c\u3001\u30b5\u30fc\u30d0\u30fc\u505c\u6b62\u306a\u3069\u306e\u969c\u5bb3\u304c\u8d77\u304d\u305f\u5834\u5408\u306b\u30c7\u30fc\u30bf\u3092\u4fdd\u7ba1\u3059\u308b\u3053\u3068\u53ca\u3073\u30b5\u30fc\u30d0\u30fc\u518d\u8d77\u52d5\u306e\u6642\u306b\u30c7\u30fc\u30bf\u3092\u518d\u751f\u6210\u3059\u308b\u305f\u3081\u3001\u30cf\u30fc\u30c9\u30c7\u30a3\u30b9\u30af\u30c9\u30e9\u30a4\u30d6\u3078\u306e\u683c\u7d0d\u3082\u5fc5\u8981\u306b\u306a\u308a\u307e\u3059\u3002Redis\u306f\u3001\u30c7\u30fc\u30bf\u3092\u30cf\u30fc\u30c9\u30c7\u30a3\u30b9\u30af\u30c9\u30e9\u30a4\u30d6\u306b\u8907\u88fd\u3059\u308b\u305f\u3081\u3001RDB\u3068AOF\u3068\u3044\u3046\u4e8c\u3064\u306e\u65b9\u5f0f\u3092\u63d0\u4f9b\u3057\u3066\u304f\u308c\u307e\u3059\u3002<\/p>\n<p><em><strong>RDB (Redis Database)<\/strong><\/em><\/p>\n<p>RDB\u306f\u3001\u4e00\u5b9a\u671f\u9593\u3054\u3068\u306bDB\u306e\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u3092\u4f5c\u6210\u3057\u3001\u30c7\u30a3\u30b9\u30af\u306b\u30c7\u30fc\u30bf\u3092\u8907\u88fd\u3057\u307e\u3059\u3002<\/p>\n<p><em>RDB\u306e\u30e1\u30ea\u30c3\u30c8<\/em><br \/>\nRDB\u3067\u306f\u3001DB\u3092\u7570\u306a\u308b\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u4fdd\u5b58\u3067\u304d\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u969c\u5bb3\u304c\u8d77\u304d\u305f\u6642\u306b\u4fbf\u5229\u3067\u3059\u3002<\/p>\n<p>RDB\u306f\u3001Redis\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u6700\u9069\u5316\u3059\u308b\u306e\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002Redis\u306e\u30e1\u30a4\u30f3\u30d7\u30ed\u30bb\u30b9\u306f\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304b\u3089\u30ea\u30af\u30a8\u30b9\u30c8\u3059\u308b\u8ffd\u52a0\u3001\u8aad\u53d6\u3001\u524a\u9664\u3068\u3044\u3063\u305f\u57fa\u672c\u7684\u306a\u64cd\u4f5c\u3092\u542b\u3081\u305f\u52d5\u4f5c\u3092RAM\u4e0a\u306b\u884c\u3044\u307e\u3059\u3002\u305d\u308c\u306b\u5bfe\u3057\u3066\u3001\u30b5\u30d6\u30d7\u30ed\u30bb\u30b9\u304c\u30c7\u30a3\u30b9\u30af\u306bI\/O\u64cd\u4f5c\u3092\u884c\u3044\u307e\u3059\u3002\u3053\u306e\u3088\u3046\u306a\u69cb\u6210\u306fRedis\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u6700\u9069\u5316\u306b\u3068\u3066\u3082\u5f79\u7acb\u3061\u307e\u3059\u3002<\/p>\n<p><em>RDB\u306e\u30c7\u30e1\u30ea\u30c3\u30c8<\/em><br \/>\n\u901a\u5e38\u3001\u30e6\u30fc\u30b6\u30fc\u306f5\u5206 (\u307e\u305f\u306f\u305d\u308c\u4ee5\u4e0a) \u3054\u3068\u306b RDB\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u3092\u4f5c\u6210\u3059\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u969c\u5bb3\u304c\u8d77\u304d\u305f\u6642\u3001Redis\u304c\u52d5\u304b\u306a\u304f\u306a\u308a\u3001\u6700\u65b0\u306e\u6642\u523b\u306e\u30c7\u30fc\u30bf\u306e\u307f\u5931\u308f\u308c\u307e\u3059\u3002<\/p>\n<p>RDB \u306f fork \u3092\u4f7f\u7528\u3057\u3066\u3001\u30c7\u30a3\u30b9\u30af I\/O \u64cd\u4f5c\u7528\u306e\u5b50\u30d7\u30ed\u30bb\u30b9\u3092\u4f5c\u6210\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u30c7\u30fc\u30bf\u304c\u5927\u304d\u3059\u304e\u308b\u3068\u3001fork\u30d7\u30ed\u30bb\u30b9\u306b\u6642\u9593\u304c\u304b\u304b\u308a\u3001\u30c7\u30fc\u30bf\u91cf\u3068 CPU \u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306b\u3088\u3063\u3066\u306f\u3001\u30b5\u30fc\u30d0\u30fc\u304c\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304b\u3089\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u306b\u6570\u30df\u30ea\u79d2\u307e\u305f\u306f 1 \u79d2\u5fdc\u7b54\u3067\u304d\u306a\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n<p id=\"_aof-append-only-file-11\"><em><strong>AOF (Append Only File)<\/strong><\/em><\/p>\n<p>AOF\u306f\u3001\u30b5\u30fc\u30d0\u30fc\u304c\u53d7\u4fe1\u3057\u305f\u3059\u3079\u3066\u306e\u66f8\u304d\u8fbc\u307f\u64cd\u4f5c\u3092\u4fdd\u5b58\u3057\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u64cd\u4f5c\u306f\u3001\u30b5\u30fc\u30d0\u30fc\u306e\u518d\u8d77\u52d5\u6642\u307e\u305f\u306f\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306e\u30ea\u30bb\u30c3\u30c8\u6642\u306b\u518d\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><em>AOF\u306e\u30e1\u30ea\u30c3\u30c8<\/em><br \/>\nAOF Redis\u306f\u3001\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u304c\u3088\u308a\u5b89\u5b9a\u3059\u308b\u3053\u3068\u3092\u78ba\u4fdd\u3057\u307e\u3059\u3002\u6bce\u79d2\u3054\u3068\u306b\u307e\u305f\u306f\u30af\u30a8\u30ea\u3054\u3068\u306b\u30ed\u30b0\u3092\u51fa\u529b\u3059\u308b\u3088\u3046\u306bRedis\u3092\u8a2d\u5b9a\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>Redis\u306f AOF\u30ed\u30b0\u3092\u65e2\u5b58\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u672b\u5c3e\u306b\u8ffd\u52a0\u3059\u308b\u5f62\u3067\u51fa\u529b\u3059\u308b\u305f\u3081\u3001\u65e2\u5b58\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u30b7\u30fc\u30af\u30d7\u30ed\u30bb\u30b9\u306f\u4e0d\u8981\u3067\u3059\u3002\u4f55\u3089\u304b\u306e\u7406\u7531 (\u30c7\u30a3\u30b9\u30af\u9818\u57df\u4e0d\u8db3\u307e\u305f\u306f\u4ed6\u306e\u7406\u7531) \u3067\u30ed\u30b0\u304c\u9014\u4e2d\u3067\u66f8\u304b\u308c\u305f\u30b3\u30de\u30f3\u30c9\u3067\u7d42\u4e86\u3057\u305f\u5834\u5408\u306b\u304a\u3044\u3066\u3082\u3001redis-check-aof \u30c4\u30fc\u30eb\u3092\u4f7f\u7528\u3059\u308b\u3068\u7c21\u5358\u306b\u4fee\u6b63\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>Redis \u306f\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9 \u30d7\u30ed\u30bb\u30b9\u3092\u63d0\u4f9b\u3057\u3001\u30d5\u30a1\u30a4\u30eb \u30b5\u30a4\u30ba\u304c\u5927\u304d\u3059\u304e\u308b\u5834\u5408\u306b AOF\u30d5\u30a1\u30a4\u30eb\u3092\u767b\u9332\u3057\u307e\u3059\u3002 Redis\u306f\u3001\u53e4\u3044\u30d5\u30a1\u30a4\u30eb\u306b\u8ffd\u52a0\u3092\u3057\u3066\u3044\u308b\u9593\u3001\u73fe\u5728\u306e\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u4f5c\u6210\u3059\u308b\u306e\u306b\u5fc5\u8981\u306a\u64cd\u4f5c\u3092\u4f7f\u3063\u3066\u5b8c\u5168\u306b\u65b0\u3057\u3044\u3082\u306e\u3092\u751f\u6210\u3057\u3001\u3053\u306e2\u756a\u76ee\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u6e96\u5099\u304c\u3067\u304d\u305f\u3089Redis\u304c2\u3064\u3092\u5207\u308a\u66ff\u3048\u65b0\u3057\u3044\u3082\u306e\u3078\u306e\u8ffd\u52a0\u3092\u958b\u59cb\u3059\u308b\u305f\u3081\u3001\u3053\u306e\u767b\u9332\u306f\u5b8c\u5168\u306b\u5b89\u5168\u3067\u3059\u3002<\/p>\n<p><em>AOF\u306e\u30c7\u30e1\u30ea\u30c3\u30c8<\/em><br \/>\n\u901a\u5e38\u3001AOF\u30d5\u30a1\u30a4\u30eb\u306f\u3001\u540c\u3058\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306e\u540c\u7b49\u306eRDB\u30d5\u30a1\u30a4\u30eb\u3088\u308a\u5927\u304d\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>AOF\u306f\u3001\u6b63\u78ba\u306afsync\u30dd\u30ea\u30b7\u30fc\u306b\u5fdc\u3058\u3066\u3001RDB\u3088\u308a\u3082\u9045\u304f\u306a\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002\u4e00\u822c\u7684\u306b\u6bce\u79d2\u3054\u3068\u306b\u8a2d\u5b9a\u3055\u308c\u305ffsync\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306f\u4f9d\u7136\u3068\u3057\u3066\u9ad8\u304f\u3001fsync\u3092\u7121\u52b9\u306b\u3059\u308b\u3068\u9ad8\u8ca0\u8377\u3067\u3082RDB\u3068\u307e\u3063\u305f\u304f\u540c\u3058\u901f\u5ea6\u3067\u52d5\u4f5c\u3059\u308b\u306f\u305a\u3067\u3059\u3002\u305d\u308c\u3067\u3082RDB\u306f\u66f8\u304d\u8fbc\u307f\u306e\u8ca0\u8377\u304c\u5927\u304d\u3044\u5834\u5408\u3067\u3082\u6700\u5927\u30ec\u30a4\u30c6\u30f3\u30b7\u306b\u3064\u3044\u3066\u306f\u3088\u308a\u591a\u304f\u306e\u4fdd\u8a3c\u3092\u63d0\u4f9b\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3>\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9<\/h3>\n<p>\u307b\u3068\u3093\u3069\u306e\u30bf\u30b9\u30af\u304c\u30c7\u30a3\u30b9\u30af\u30c9\u30e9\u30a4\u30d6\u3078\u306e\u30a2\u30af\u30bb\u30b9\u306e\u7e70\u308a\u8fd4\u3057\u3092\u5fc5\u8981\u3068\u3059\u308b\u5f93\u6765\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u306f\u7570\u306a\u308a\u3001Redis\u306f\u5358\u7d14\u306b\u8a08\u7b97\u7d50\u679c\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001Redis\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306f\u3001\u4f4e\u30ec\u30f3\u30c6\u30f3\u30b7\u3068\u9ad8\u30b9\u30eb\u30fc\u30d7\u30c3\u30c8\u3067\u4e00\u822c\u7684\u306a\u8aad\u307f\u66f8\u304d\u306e\u30bf\u30b9\u30af\u304c\u8457\u3057\u304f\u9ad8\u901f\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u305d\u306e\u7d50\u679c\u3001\u3088\u308a\u591a\u304f\u306e\u64cd\u4f5c\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3001\u5fdc\u7b54\u6642\u9593\u309210\u500d\u9ad8\u901f\u5316\u3057\u307e\u3059\u3002\u5e73\u5747\u3067\u30df\u30ea\u79d2\u672a\u6e80\u306e\u8aad\u307f\u66f8\u304d\u306e\u64cd\u4f5c\u3092\u5b9f\u73fe\u3067\u304d\u30011 \u79d2\u9593\u306b\u6570\u767e\u4e07\u4ef6\u306e\u64cd\u4f5c\u3092\u30b5\u30dd\u30fc\u30c8\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-6568\" src=\"https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2022\/08\/05151236\/nosql-benchmark-200000-300x208.png\" alt=\"\" width=\"703\" height=\"487\" srcset=\"https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2022\/08\/05151236\/nosql-benchmark-200000-300x208.png 300w, https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2022\/08\/05151236\/nosql-benchmark-200000.png 484w\" sizes=\"auto, (max-width: 703px) 100vw, 703px\" \/><\/p>\n<h3>Redis\u306e\u4e00\u822c\u7684\u306a\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9<\/h3>\n<p>\u30ad\u30e3\u30c3\u30b7\u30e5<\/p>\n<p>\u51e6\u7406\u5f85\u3061\u306e\u30bf\u30b9\u30af\u4e00\u89a7<\/p>\n<p>\u30b2\u30fc\u30e0\u306e\u30ea\u30fc\u30c0\u30fc\u30dc\u30fc\u30c9<\/p>\n<p>\u30bb\u30c3\u30b7\u30e7\u30f3\u7ba1\u7406<\/p>\n<p>\u30de\u30b7\u30f3\u30e9\u30fc\u30cb\u30f3\u30b0<\/p>\n<p>\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u5206\u6790<\/p>\n<p>\u306a\u3069<\/p>\n<h2>Redis Stack<\/h2>\n<p>Redis Stack\u306f\u3001\u30c7\u30fc\u30bf\u30e2\u30c7\u30eb\u3068\u51e6\u7406\u30a8\u30f3\u30b8\u30f3\u3092\u8ffd\u52a0\u3059\u308bRedis\u306e\u62e1\u5f35\u6a5f\u80fd\u3067\u3059\u3002\u30d7\u30ed\u30b0\u30e9\u30de\u30fc\u304c\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u30df\u30ea\u79d2\u5358\u4f4d\u3067\u78ba\u5b9f\u306b\u51e6\u7406\u3067\u304d\u308b\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u30c7\u30fc\u30bf\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3092\u5099\u3048\u305f\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u69cb\u7bc9\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u305f\u3081\u306b\u4f5c\u6210\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p>Redis Stack\u306b\u306f<strong>RedisJSON<\/strong>\u3001<strong>RediSearch<\/strong>\u3001<strong>RedisGraph<\/strong>\u3001<strong>RedisTimeSeries<\/strong>\u3001<strong>RedisBloom<\/strong>\u306e5\u3064\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u3055\u3089\u306b\u3001Redis Stack\u306b\u306f\u3001\u30c7\u30fc\u30bf\u3092\u8996\u899a\u5316\u30fb\u6700\u9069\u5316\u3059\u308b\u30c4\u30fc\u30eb\u3067\u3042\u308b<strong>RedisInsight<\/strong>\u3082\u542b\u307e\u308c\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-6602\" src=\"https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2022\/08\/10104316\/RedisInsight-300x160.png\" alt=\"\" width=\"831\" height=\"443\" srcset=\"https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2022\/08\/10104316\/RedisInsight-300x160.png 300w, https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2022\/08\/10104316\/RedisInsight-1024x545.png 1024w, https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2022\/08\/10104316\/RedisInsight-768x409.png 768w, https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2022\/08\/10104316\/RedisInsight.png 1366w\" sizes=\"auto, (max-width: 831px) 100vw, 831px\" \/><\/p>\n<p style=\"text-align: center;\"><em>RedisInsight\u306e\u753b\u9762<\/em><\/p>\n<p>Redis Stack\u304c\u3069\u306e\u3088\u3046\u306b\u52d5\u4f5c\u3059\u308b\u304b\u3092\u7406\u89e3\u3059\u308b\u305f\u3081\u306b\u3001<strong>node-redis<\/strong>\u30e9\u30a4\u30d6\u30e9\u30ea\u3067<strong>RedisJSON<\/strong>\u3068<strong>RediSearch<\/strong>\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5\u3092\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n<p><strong>node-redis<\/strong>\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/p>\n<pre>npm install redis<\/pre>\n<p>Redis\u30b5\u30fc\u30d0\u30fc\u3078\u306e\u63a5\u7d9a<\/p>\n<pre>import { createClient } from 'redis';\r\n\r\nconst client = <span class=\"pl-en\">createClient<\/span><span class=\"pl-kos\">(<\/span><span class=\"pl-kos\">{<\/span>\r\n  <span class=\"pl-c1\">url<\/span>: <span class=\"pl-s\">'redis[s]:\/\/[[username][:password]@][host][:port][\/db-number]'<\/span>\r\n<span class=\"pl-kos\">}<\/span><span class=\"pl-kos\">)<\/span><span class=\"pl-kos\">;\r\n\r\n<\/span>client.on('error', (err) =&gt; console.log('Redis Client Error', err));\r\n\r\nawait client.connect();<\/pre>\n<h3>RedisJSON<\/h3>\n<p>RedisJSON\u306f\u3001Redis\u3067 JSON\u3092\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u305f\u3081\u63d0\u4f9b\u3055\u308c\u308b Redis \u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u3059\u3002 RedisJSON\u3092\u4f7f\u3046\u3068\u3001\u4ed6\u306e Redis \u30c7\u30fc\u30bf\u578b\u3068\u540c\u69d8\u306b\u3001Redis\u3067JSON\u5024\u3092\u767b\u9332\u30fb\u66f4\u65b0\u30fb\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u307e\u305f\u3001RedisJSON\u306fRediSearch\u3068\u540c\u6642\u306b\u52d5\u4f5c\u3057\u3001JSON \u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u4f5c\u6210\u3068\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<p>\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306f\u30c4\u30ea\u30fc\u69cb\u9020\u306e\u30d0\u30a4\u30ca\u30ea \u30c7\u30fc\u30bf\u3068\u3057\u3066\u683c\u7d0d\u3055\u308c\u308b\u305f\u3081\u3001\u5b50\u8981\u7d20\u306b\u7d20\u65e9\u304f\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u3059\u3002<\/p>\n<p dir=\"auto\"><strong>JSON\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306eRedis\u3078\u306e\u4fdd\u5b58<\/strong><\/p>\n<p dir=\"auto\"><code>JSON.SET<\/code>\u30b3\u30de\u30f3\u30c9\u306f\u3001Redis\u30ad\u30fc\u306e\u6307\u5b9a\u3055\u308c\u305fJSON\u30d1\u30b9\u306bJSON\u5024\u3092\u683c\u7d0d\u3057\u307e\u3059\u3002<\/p>\n<p dir=\"auto\">\u3053\u3053\u3067\u306f\u3001JSON\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092Redis\u30ad\u30fc&#8221;<code>users<\/code>&#8220;\u306e\u30eb\u30fc\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u4fdd\u5b58\u3057\u307e\u3059\u3002<\/p>\n<div>\n<div>\n<pre>await client.json.set('noderedis:users', '$', {\r\n  \u00a0 name: 'Alice',\r\n  \u00a0 age: 29\r\n});<\/pre>\n<\/div>\n<p dir=\"auto\"><strong><span class=\"goog-text-highlight\">Redis\u304b\u3089JSON\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u62bd\u51fa<\/span><\/strong><\/p>\n<div>\n<pre>const results = await client.json.get('noderedis:users');<\/pre>\n<p><code>results<\/code>\u306e\u7d50\u679c\u306f \u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8fd4\u5374\u3055\u308c\u307e\u3059\u3002<\/p>\n<div class=\"highlight highlight-source-js notranslate position-relative overflow-auto rgh-observing-whitespace rgh-linkified-code\">\n<pre class=\"rgh-observing-whitespace rgh-linkified-code\">{ name: 'Alice', age: 29 }<\/pre>\n<\/div>\n<\/div>\n<\/div>\n<h3>RediSearch<\/h3>\n<p>RediSearch\u306f\u3001\u30af\u30a8\u30ea\u3001\u30b5\u30d6\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u4f5c\u6210\u3001\u3068\u691c\u7d22\u6a5f\u80fd\u3092\u63d0\u4f9b\u3059\u308bRedis\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u3059\u3002 RediSearch\u3092\u4f7f\u7528\u3059\u308b\u306b\u306f\u3001\u6700\u521d\u306b\u3001Redis\u30c7\u30fc\u30bf\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u5ba3\u8a00\u3057\u307e\u3059\u3002 \u305d\u306e\u5f8c\u3001RediSearch\u30af\u30a8\u30ea\u8a00\u8a9e\u3092\u4f7f\u7528\u3057\u3066\u305d\u306e\u30c7\u30fc\u30bf\u3092\u30af\u30a8\u30ea\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>RediSearch\u306f\u5727\u7e2e\u3055\u308c\u305f\u9006\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3057\u3066\u3001\u5c11\u306a\u3044\u30e1\u30e2\u30ea\u3067\u8fc5\u901f\u306b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<p>RediSearch\u306f\u3001\u6b63\u78ba\u306a\u30d5\u30ec\u30fc\u30ba\u30de\u30c3\u30c1\u30f3\u30b0\u3001\u3042\u3044\u307e\u3044\u691c\u7d22 (\u985e\u4f3c\u691c\u7d22)\u3001\u3084\u30c6\u30ad\u30b9\u30c8\u30af\u30a8\u30ea\u306e\u6570\u5024\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u306a\u3069\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002<\/p>\n<h3>Redis Hashes\u3067\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u4f5c\u6210\u3068\u30af\u30a8\u30ea<\/h3>\n<p><strong>\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u4f5c\u6210<\/strong><\/p>\n<p>\u691c\u7d22\u3092\u884c\u3046\u524d\u306b\u3001RediSearch\u306b\u30c7\u30fc\u30bf\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f5c\u6210\u3059\u308b\u65b9\u6cd5\u3068\u3001\u30c7\u30fc\u30bf\u3092\u691c\u7d22\u3059\u308b\u305f\u3081\u306e\u30ad\u30fc\u3092\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<strong>FT.CREATE<\/strong>\u30b3\u30de\u30f3\u30c9\u306f \u3001RediSearch\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002 \u3053\u308c\u3092\u4f7f\u7528\u3057\u3066<code>idx:animals<\/code><span class=\"\">\u3068\u547c\u3076\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f5c\u6210\u3059\u308b\u65b9\u6cd5\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002\u3053\u3053\u3067\u3001<\/span><code>name<\/code>\u3001<span class=\"\"><code>species<\/code>\u3001<code>age<\/code>\u306e\u5404\u9805\u76ee<\/span><span class=\"\">\u53ca\u3073\u63a5\u982d\u8f9e<\/span><code>noderedis:animals<\/code><span class=\"\">\u3067\u59cb\u307e\u308bRedis\u306e\u30ad\u30fc\u540d\u3092\u542b\u3080\u30cf\u30c3\u30b7\u30e5\u306b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4ed8\u3051\u307e\u3059<\/span><\/p>\n<pre>await client.ft.create('idx:animals', {\r\n  name: {\r\n    type: SchemaFieldTypes.TEXT,\r\n    sortable: true\r\n  },\r\n    species: SchemaFieldTypes.TAG,\r\n    age: SchemaFieldTypes.NUMERIC\r\n  }, {\r\n    ON: 'HASH',\r\n    PREFIX: 'noderedis:animals'\r\n  }\r\n);<\/pre>\n<p>\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f5c\u6210\u3057\u305f\u3042\u3068\u3001\u5bfe\u5fdc\u3059\u308b\u63a5\u982d\u8f9e\u3092\u4ed8\u3051\u308b\u3059\u3079\u3066\u306e\u65b0\u3057\u3044\u30cf\u30c3\u30b7\u30e5\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u304c\u3001\u4f5c\u6210\u6642\u306b\u81ea\u52d5\u7684\u306b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><strong>\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u8ffd\u52a0<\/strong><\/p>\n<p><strong>HSET<\/strong>\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3063\u3066\u3001\u65b0\u3057\u3044\u30cf\u30c3\u30b7\u30e5\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u4f5c\u6210\u3057\u3001\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<pre>await client.hSet('noderedis:animals:1', {name: 'Fluffy', species: 'cat', age: 3});\r\nawait client.hSet('noderedis:animals:2', {name: 'Ginger', species: 'dog', age: 4});<\/pre>\n<p><strong>\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u691c\u7d22<\/strong><\/p>\n<p><strong>FT.SEARCH<\/strong>\u3092\u4f7f\u3063\u3066\u3001\u7279\u5b9a\u306e\u5358\u8a9e\u3092\u542b\u3080\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u691c\u7d22\u307e\u3059\u3002<\/p>\n<pre class=\"rgh-observing-whitespace rgh-linkified-code\">const results = await client.ft.search(\r\n    'idx:animals', \r\n    '@species:{dog}',\r\n    {\r\n      SORTBY: {\r\n        BY: 'age',\r\n        DIRECTION: 'DESC' \/\/ or 'ASC' (default if DIRECTION is not present)\r\n      }\r\n    }\r\n  );<\/pre>\n<p><code>results<\/code>\u306e\u7d50\u679c\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8fd4\u5374\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"rgh-observing-whitespace rgh-linkified-code\"><span class=\"pl-kos\">{<\/span>\r\n  <span class=\"pl-c1\">total<\/span>: 1<span class=\"pl-kos\">,<\/span>\r\n  <span class=\"pl-c1\">documents<\/span>: <span class=\"pl-kos\">[<\/span>\r\n    <span class=\"pl-kos\">{<\/span>\r\n      <span class=\"pl-c1\">id<\/span>: <span class=\"pl-s\">'noderedis:animals:2'<\/span><span class=\"pl-kos\">,<\/span>\r\n      <span class=\"pl-c1\">value<\/span>: <span class=\"pl-kos\">{<\/span>\r\n        <span class=\"pl-c1\">name<\/span>: <span class=\"pl-s\">'Ginger'<\/span><span class=\"pl-kos\">,<\/span>\r\n        <span class=\"pl-c1\">species<\/span>: <span class=\"pl-s\">'dog'<\/span><span class=\"pl-kos\">,<\/span>\r\n        <span class=\"pl-c1\">age<\/span>: <span class=\"pl-s\">'4'<\/span>\r\n      <span class=\"pl-kos\">}<\/span>\r\n    <span class=\"pl-kos\">}\r\n<\/span><span class=\"pl-kos\">  ]<\/span>\r\n<span class=\"pl-kos\">}<\/span><\/pre>\n<h3>RedisJSON\u3067\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u4f5c\u6210\u3068\u30af\u30a8\u30ea<\/h3>\n<p dir=\"auto\"><strong>\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u4f5c\u6210<\/strong><\/p>\n<p dir=\"auto\">JSON\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u306b\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5b9f\u88c5\u3057\u307e\u3059\u3002<\/p>\n<div>\n<pre>await client.ft.create('idx:users', {\r\n  \u00a0 '$.name': {\r\n  \u00a0 \u00a0 \u00a0 type: SchemaFieldTypes.TEXT,\r\n  \u00a0 \u00a0 \u00a0 SORTABLE: 'UNF'\r\n  \u00a0 },\r\n  \u00a0 '$.age': {\r\n  \u00a0 \u00a0 \u00a0 type: SchemaFieldTypes.NUMERIC,\r\n  \u00a0 \u00a0 \u00a0 AS: 'age'\r\n  \u00a0 },\r\n}, {\r\n  \u00a0 ON: 'JSON',\r\n  \u00a0 PREFIX: 'noderedis:users'\r\n});<\/pre>\n<p dir=\"auto\"><strong>\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u30af\u30a8\u30ea<\/strong><\/p>\n<p dir=\"auto\"><span class=\"\"><code>FT.SEARCH<\/code><\/span><span class=\"\">\u30b3\u30de\u30f3\u30c9\u3068RediSearch\u30af\u30a8\u30ea\u8a00\u8a9e\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/span><\/p>\n<p dir=\"auto\"><span class=\"\">\u4f8b\uff1a30\u6b73\u672a\u6e80\u306e\u30e6\u30fc\u30b6\u30fc\u3092\u691c\u7d22\u3059\u308b\u30af\u30a8\u30ea\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/span><\/p>\n<div class=\"highlight highlight-source-js notranslate position-relative overflow-auto rgh-observing-whitespace rgh-linkified-code\">\n<div>\n<pre>const results = <span class=\"pl-k\" style=\"font-family: Consolas, Monaco, monospace;\">await<\/span> <span class=\"pl-s1\" style=\"font-family: Consolas, Monaco, monospace;\">client<\/span><span class=\"pl-kos\" style=\"font-family: Consolas, Monaco, monospace;\">.<\/span><span class=\"pl-c1\" style=\"font-family: Consolas, Monaco, monospace;\">ft<\/span><span class=\"pl-kos\" style=\"font-family: Consolas, Monaco, monospace;\">.<\/span><span class=\"pl-en\" style=\"font-family: Consolas, Monaco, monospace;\">search<\/span><span class=\"pl-kos\" style=\"font-family: Consolas, Monaco, monospace;\">(<\/span><span class=\"pl-s\" style=\"font-family: Consolas, Monaco, monospace;\">'idx:users'<\/span><span class=\"pl-kos\" style=\"font-family: Consolas, Monaco, monospace;\">,<\/span> <span class=\"pl-s\" style=\"font-family: Consolas, Monaco, monospace;\">'@age:[0 30]'<\/span><span class=\"pl-kos\" style=\"font-family: Consolas, Monaco, monospace;\">)<\/span><span class=\"pl-kos\" style=\"font-family: Consolas, Monaco, monospace;\">;<\/span><\/pre>\n<\/div>\n<\/div>\n<p dir=\"auto\"><code>results<\/code>\u306e\u7d50\u679c\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b \u8fd4\u5374\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre>{\r\n  \"total\": 1,\r\n  \"documents\": [\r\n    {\r\n      \"id\": \"noderedis:users\",\r\n      \"value\": {\r\n        \"name\": \"Alice\",\r\n        \"age\": 29\r\n      }\r\n    }\r\n  ]\r\n}<\/pre>\n<h2><strong>\u7d50\u8ad6<\/strong><\/h2>\n<p>Redis\u306f\u3001\u591a\u304f\u306e\u30e1\u30ea\u30c3\u30c8\u3092\u6301\u3061\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u30c7\u30fc\u30bf\u30b9\u30c8\u30a2\u3067\u3042\u308b\u305f\u3081\u3001\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u958b\u767a\u306b\u304a\u3044\u3066\u5e83\u304f\u4f7f\u7528\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>Redis\u306f\u3001\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u6027\u306e\u6c42\u3081\u3089\u308c\u308b\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3084\u30c7\u30fc\u30bf\u30ad\u30e3\u30c3\u30b7\u30e5\u306b\u6700\u9069\u3067\u3059\u3002\u7c21\u5358\u306b\u8a2d\u5b9a\u3067\u304d\u3001\u975e\u5e38\u306b\u9ad8\u901f\u306b\u5fdc\u7b54\u3067\u304d\u3001\u67d4\u8edf\u306a\u30c7\u30fc\u30bf\u69cb\u9020\u3092\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u304b\u3089\u3067\u3059\u3002<\/p>\n<p>Redis\u306f\u3001Memcached\u3068\u6bd4\u8f03\u3057\u3066RAM\u4e0a\u306b\u30c7\u30fc\u30bf\u3092\u4fdd\u5b58\u3059\u308b\u540c\u3058\u30e1\u30ab\u30cb\u30ba\u30e0\u3092\u4f7f\u7528\u3057\u307e\u3059\u304c\u3001\u30b5\u30fc\u30d0\u30fc\u5074\u3067\u3088\u308a\u591a\u304f\u306e\u30c7\u30fc\u30bf\u578b\u3068\u64cd\u4f5c\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002 \u307e\u305f\u3001Redis\u306f\u3001Memcached\u306b\u306f\u306a\u3044\u3067\u3059\u304c\u3001\u30c7\u30fc\u30bf\u3092\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3059\u308b\u30e1\u30ab\u30cb\u30ba\u30e0\u3082\u7528\u610f\u3057\u307e\u3059\u3002 \u3057\u305f\u304c\u3063\u3066\u3001\u8907\u96d1\u306a\u30c7\u30fc\u30bf\u69cb\u9020\u3092\u6301\u3064\u30b7\u30b9\u30c6\u30e0\u3092\u30ad\u30e3\u30c3\u30b7\u30e5\u3057\u305f\u3044\u5834\u5408\u306f\u3001Redis\u306e\u65b9\u304c\u9069\u3057\u307e\u3059<\/p>\n<h2><strong>\u53c2\u8003\u5143<\/strong><\/h2>\n<p><a href=\"https:\/\/redis.io\/docs\/\">https:\/\/redis.io\/docs\/<\/a><\/p>\n<p><a href=\"https:\/\/redis.js.org\/\">https:\/\/redis.js.org\/<\/a><\/p>\n<p><a href=\"https:\/\/byterot.blogspot.com\/2012\/11\/nosql-benchmark-redis-mongodb-ravendb-cassandra-sqlserver.html\">https:\/\/byterot.blogspot.com\/2012\/11\/nosql-benchmark-redis-mongodb-ravendb-cassandra-sqlserver<\/a><\/p>\n<p><a href=\"https:\/\/github.com\/redis\/node-redis\">https:\/\/github.com\/redis\/node-redis<\/a><\/p>\n<\/div>\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>\u521d\u3081\u306b Redis\u306fRemote Dictionary Server\u306e\u7565\u79f0\u3067\u3042\u308a\u3001NoSQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u7ba1\u7406\u30b7\u30b9\u30c6\u30e0\u306e\u4e00\u3064\u3067\u3059\u3002  [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":6537,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"footnotes":""},"categories":[4,71],"tags":[],"class_list":["post-6535","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news","category-it-tec"],"_links":{"self":[{"href":"https:\/\/www.briswell-vn.com\/ja\/wp-json\/wp\/v2\/posts\/6535","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.briswell-vn.com\/ja\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.briswell-vn.com\/ja\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.briswell-vn.com\/ja\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.briswell-vn.com\/ja\/wp-json\/wp\/v2\/comments?post=6535"}],"version-history":[{"count":0,"href":"https:\/\/www.briswell-vn.com\/ja\/wp-json\/wp\/v2\/posts\/6535\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.briswell-vn.com\/ja\/wp-json\/wp\/v2\/media\/6537"}],"wp:attachment":[{"href":"https:\/\/www.briswell-vn.com\/ja\/wp-json\/wp\/v2\/media?parent=6535"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.briswell-vn.com\/ja\/wp-json\/wp\/v2\/categories?post=6535"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.briswell-vn.com\/ja\/wp-json\/wp\/v2\/tags?post=6535"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}