current location:Home > Technical Articles > Database > Redis

  • How to install redis extension in PHP under Linux
    How to install redis extension in PHP under Linux
    Description: Operating system: CentOSphp installation directory:/usr/local/phpphp.ini configuration file path:/usr/local/php/etc/php.iniNginx installation directory:/usr/local/nginxNginx website root directory:/usr/local /nginx/htmllinuxphp specific steps to install redis extension 1. Install the compilation tool yuminstallwgetmakegccgcc-c++zlib-developensslopenssl-develpcre-develkernelkeyutilspatch
    Redis 1517 2023-05-29 14:01:33
  • Example analysis of master-slave replication, sentry, and clustering in Redis
    Example analysis of master-slave replication, sentry, and clustering in Redis
    1. Redis master-slave replication 1. Overview of master-slave replication Master-slave replication refers to copying data from one server to other Redis servers. The former is called the master node (Master), and the latter is called the slave node (Slave); data replication is one-way, and can only be from the master node to the slave node. By default, each Redis server is a master node; and a master node can have multiple slave nodes, but a slave node can only have one master node. [Related recommendation: Redis video tutorial] 2. The role of master-slave replication ● Data redundancy: Master-slave replication implements hot backup of data, which is a data redundancy method in addition to persistence. ●Failure recovery: When a problem occurs on the master node, the slave node can provide services to achieve rapid fault recovery.
    Redis 823 2023-05-29 13:52:54
  • How to implement the demo of springboot+mybatisplus+redis
    How to implement the demo of springboot+mybatisplus+redis
    1.pom.xml中倒入需要的jar包4.0.0org.examplespringboot_redis_demo1.0-SNAPSHOTorg.springframework.bootspring-boot-starter-parent2.5.0org.springframework.bootspring-boot-starter-web2.5.0mysqlmysql-connector-java8.0.25org.springframework.bootspring-boot-starter-
    Redis 933 2023-05-29 12:43:06
  • How to configure single instance redis in Linux
    How to configure single instance redis in Linux
    Introduction to redis Redis is an advanced key-value database. It is similar to memcached, but data can be persisted and supports a wide range of data types. There are strings, linked lists, sets and sorted sets. It supports calculating the union, intersection and complement (difference) of sets on the server side, and also supports a variety of sorting functions. So Redis can also be regarded as a data structure server. PS: This installation uses redis to store strings to store user sessions. Installation planning software package storage location: /usr/local/src Software package compilation location: /usr/local/src/redis-x-x/software installation location
    Redis 1049 2023-05-29 11:58:52
  • What are the common key-value designs of Redis databases?
    What are the common key-value designs of Redis databases?
    User login system is a system that records user login information. We simplify the business and only leave one table. Design of relational database mysql>select*fromlogin; +---------+----------------+---------- --+---------------------+ |user_id|name|login_times|last_login_time| +---------+----- ----------+-------------+-------------------
    Redis 858 2023-05-29 11:50:48
  • How to solve the error when springboot configures redis project startup
    How to solve the error when springboot configures redis project startup
    Error when configuring the redis project in springboot. When I first started learning redis, I followed the online tutorials to integrate redis and jedis into springboot. After the integration, the project always failed to start and the following error always appeared: Correcttheclasspathofyourapplicationsothatitcontainsasingle,compatibleversionoforg. springframework.data.repository.config.RepositoryConfigurationSource****
    Redis 2851 2023-05-29 11:25:24
  • How does SpringSession count the number of online users through Redis?
    How does SpringSession count the number of online users through Redis?
    Because the original logic of the system is to use SpringSession plus session sharing by Redis to implement single sign-on. After logging in, a key value will be set in the session to indicate that the user has logged in. At the same time, HttpServletRequestWrapper will be rewritten to set the remoteUser data value classRemoteUserRequestWrapperextendsHttpServletRequestWrapper{StringuserCode;RemoteUserRequestWrapper( HttpServletRequestrequest){
    Redis 1129 2023-05-29 10:52:05
  • How to quickly install Redis and set up self-starting
    How to quickly install Redis and set up self-starting
    Analyze two relatively practical solutions: One is to install redis through docker and hook the configuration file to the local file through the data volume. The second is to use shell scripts to help us complete these mechanized operations. The first type is very unfriendly to novices. You need to consult more information and try more mistakes. If you are eager to complete the task, it will cause you more trouble. In order to really help everyone, this article will talk about the second type and go directly to the topic. To write a script, first enter any directory on the server and execute the following command: viredis-install.sh to enter the vi editor, click i to open the editing mode, and paste the following code into it (change the version and installation directory according to your needs): #!/
    Redis 1387 2023-05-29 10:43:06
  • How to use Python to operate Redis under Windows
    How to use Python to operate Redis under Windows
    First, let’s talk about installing redis under windows. The installation package can be found on the official website. You can download the msi installation file or the zip compressed file. After downloading the zip file, unzip it. After unzipping, there are these files: The windowsservicedocumentation.docx inside is a document with installation instructions and usage methods. You can also directly download the msi installation file and install it directly. These files will also be in the installation directory after installation, and you can configure redis accordingly. After the installation is complete, you can test redis by double-clicking redis-cli.exe. If no error is reported, the local redis should be connected and simplified.
    Redis 1816 2023-05-29 10:21:26
  • What are the steps to install Redis on Linux system
    What are the steps to install Redis on Linux system
    I believe everyone has seen the red envelope grabbing activity at the 2021 Spring Festival Gala. According to statistics, a total of 70.3 billion red envelope interactions and 1.221 billion viewers in the Spring Festival Gala live broadcast room during the Spring Festival Gala. Faced with such a huge traffic, the self-developed volcano engine was tested. The redis system plays an important role in this. Introduction to Redis: Redis is completely open source, complies with the BSD protocol, and is a high-performance key-value database. Redis and other key-value cache products have the following three characteristics: Redis supports data persistence, and can save data in memory to the disk, and can be loaded again for use when restarting. Redis supports more than just simple k
    Redis 1912 2023-05-29 10:01:12
  • How to solve the error when installing redis6.0.6 on Centos
    How to solve the error when installing redis6.0.6 on Centos
    The error content is as follows: Infileincludedfromserver.c:31:0:server.c:4999:59:error:‘structredisServer’hasnomembernamed‘cluster’(server.cluster_enabled&&nodeIsMaster(server.cluster->myself)));. . . . . . Reason: In versions after redis 6.0.0+, compiling redis needs to support the C11 feature, which was introduced in 4.9. Centos7 default gc
    Redis 1062 2023-05-29 10:01:05
  • How does redis solve inventory concurrency issues and achieve quantity control?
    How does redis solve inventory concurrency issues and achieve quantity control?
    Redis is a single process and blocking type. It can only process one request at the same time, and subsequent requests need to be queued and waited. Advantages: Because it is a single process, there is no need to deal with concurrency issues, reducing system complexity Disadvantages: Not suitable for caching large-size objects (more than 100kb) Reason: Since Redis only uses a single core, and Memcached can use multiple cores, on average each core Redis has higher performance than Memcached when storing small data. For data of more than 100k, the performance of Memcached is higher than that of Redis. Although Redis has also optimized the performance of storing big data, it is still slightly inferior to Memcached. memcache is multi-process,
    Redis 950 2023-05-29 09:52:20
  • How to solve the timeout and oversold problems in the flash sale scenario in Redis
    How to solve the timeout and oversold problems in the flash sale scenario in Redis
    Timeout 1. Reasons for redis connection timeout (1) Configuration issues in the virtual machine When we test whether the redis connection is successful when testing the remote connection, the console may report the following error. As shown below: I get a headache every time I see the red text on the console. . . The display in the console probably means that the connection timeout caused the failure. The following three reasons for connection failure are summarized: The firewall in Linux is not closed and causes failure. redis needs to be opened. bind127.0.01 in redis.conf needs to be commented out, and then protected-modeno needs to be modified. If you encounter the above problems later, please look it up yourself. (2) The timeout simulated in high concurrency during successful redis connection is shown in the figure.
    Redis 1436 2023-05-29 09:31:32
  • How to use the HyperLogLog data type in Redis
    How to use the HyperLogLog data type in Redis
    1. Principle of HyperLogLog RedisHyperLogLog estimates the cardinality based on a probabilistic algorithm called the HyperLogLog algorithm. HyperLogLog uses a bit array of length m and some hash function to estimate the number of unique elements in the collection. In the HyperLogLog algorithm, each element is hashed, and after the hash value is converted into binary, each element is scored according to the number of 1's in the binary string prefix. For example, if the hash value of an element is 01110100011, then the number of 1's in the prefix is ​​3, so in the HyperLogLog algorithm, the score of this element is 3. When the scores of all elements are counted,
    Redis 956 2023-05-29 09:29:12
  • How to use RedisLive to monitor Redis server
    How to use RedisLive to monitor Redis server
    RedisLive is an open source graphical monitoring tool written in python. It is very lightweight. The core service part only includes a web service and a monitoring service based on the info command and monitor command that come with redis. The interface only has a BootStrap-based The web interface is very simple and clear. In addition, it also supports multi-instance monitoring, easy switching, and very easy to configure. Monitoring information supports redis storage and persistent storage (sqlite). Install RedisLive using Python and use Tornado as its own web server. No additional compilation is required to run RedisLive
    Redis 1602 2023-05-29 09:20:09

Tool Recommendations

jQuery enterprise message form contact code

jQuery enterprise message form contact code is a simple and practical enterprise message form and contact us introduction page code.
form button
2024-02-29

HTML5 MP3 music box playback effects

HTML5 MP3 music box playback special effect is an mp3 music player based on HTML5 css3 to create cute music box emoticons and click the switch button.

HTML5 cool particle animation navigation menu special effects

HTML5 cool particle animation navigation menu special effect is a special effect that changes color when the navigation menu is hovered by the mouse.
Menu navigation
2024-02-29

jQuery visual form drag and drop editing code

jQuery visual form drag and drop editing code is a visual form based on jQuery and bootstrap framework.
form button
2024-02-29

Organic fruit and vegetable supplier web template Bootstrap5

An organic fruit and vegetable supplier web template-Bootstrap5
Bootstrap template
2023-02-03

Bootstrap3 multifunctional data information background management responsive web page template-Novus

Bootstrap3 multifunctional data information background management responsive web page template-Novus
backend template
2023-02-02

Real estate resource service platform web page template Bootstrap5

Real estate resource service platform web page template Bootstrap5
Bootstrap template
2023-02-02

Simple resume information web template Bootstrap4

Simple resume information web template Bootstrap4
Bootstrap template
2023-02-02

Cute summer elements vector material (EPS PNG)

This is a cute summer element vector material, including the sun, sun hat, coconut tree, bikini, airplane, watermelon, ice cream, ice cream, cold drink, swimming ring, flip-flops, pineapple, conch, shell, starfish, crab, Lemons, sunscreen, sunglasses, etc., the materials are provided in EPS and PNG formats, including JPG previews.
PNG material
2024-05-09

Four red 2023 graduation badges vector material (AI EPS PNG)

This is a red 2023 graduation badge vector material, four in total, available in AI, EPS and PNG formats, including JPG preview.
PNG material
2024-02-29

Singing bird and cart filled with flowers design spring banner vector material (AI EPS)

This is a spring banner vector material designed with singing birds and a cart full of flowers. It is available in AI and EPS formats, including JPG preview.
banner picture
2024-02-29

Golden graduation cap vector material (EPS PNG)

This is a golden graduation cap vector material, available in EPS and PNG formats, including JPG preview.
PNG material
2024-02-27

Home Decor Cleaning and Repair Service Company Website Template

Home Decoration Cleaning and Maintenance Service Company Website Template is a website template download suitable for promotional websites that provide home decoration, cleaning, maintenance and other service organizations. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-05-09

Fresh color personal resume guide page template

Fresh color matching personal job application resume guide page template is a personal job search resume work display guide page web template download suitable for fresh color matching style. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-29

Designer Creative Job Resume Web Template

Designer Creative Job Resume Web Template is a downloadable web template for personal job resume display suitable for various designer positions. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-28

Modern engineering construction company website template

The modern engineering and construction company website template is a downloadable website template suitable for promotion of the engineering and construction service industry. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-28