PHP uses Redis to realize Session sharing

Last modified: 16:06:36, May 10, 2019 Preface For small-scale web services, session data is basically stored locally (more local disk files), but when multiple services are deployed and session sharing is required, ensure that each service can share the same session data redis data is stored in memory with good performance. With persistence, da ...

Posted on Wed, 13 Nov 2019 10:20:45 -0500 by cornelombaard

Memory crash? In fact, you just need to change the way

Using the Set set Set provided by JDK for URL de duplication seems to work well, but there is a fatal flaw in this approach. As the number of URLs collected increases, you need more and more memory, which will eventually cause your memory to crash. Do we have a solution without using the database? Bloon filter! It can solve this problem perfec ...

Posted on Wed, 13 Nov 2019 06:13:29 -0500 by ScOrPi

Use and integration of spring cache and ehcache

The project needs to be cached, so I learned 1. Use and integration of spring cache and ehcache 2. Cache hit ratio and other statistics 1. spring cache 1. Overview Spring 3.1 introduces annotation-based cache technology 2. Required jar packages          3. Usage Deposit @ Cacheable(value="cache container), key="key value&quo ...

Posted on Mon, 11 Nov 2019 22:55:26 -0500 by bhavin12300

Multi level cache architecture development 4 (using the pub/sub message mechanism of redis to realize the data synchronization of the first level cache)

Achieve goals: Use redis's pub/sub message mechanism to delete and empty the first level cache, Reason: Because if the application is a distributed system, the data in the first level cache cannot be synchronized, so when the second level cache is clear, Using the message mechanism of redis to realize the data synchronizati ...

Posted on Mon, 11 Nov 2019 17:52:17 -0500 by CloudSex13

Multi level cache architecture development VI (test development framework)

0. Import pom file Add pom file of parent module <dependencyManagement> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <version>${spri ...

Posted on Mon, 11 Nov 2019 17:15:57 -0500 by zahadum

VIII. springboot is simply and elegantly built by docker compose

Preface This project hasn't been updated for a while, but I haven't been lazy. I secretly prepared a big move. Now it's time to show it. What we need to do today is to build our project into a mirror running through docker compose. Why do you want to do this? Compared with my previous tutorials, mysql is used. If you want to run my program, you ...

Posted on Mon, 11 Nov 2019 06:43:18 -0500 by shikhartandon

docker-compose configuration spring environment

Recently, packaged projects need to be tested by members, but once packaged, development is affected, so you plan to use docker to simulate a production environment to run packaged projects so that you can develop and test members as well.Because the original project is too large, we intend to take the large experiment of software engineering t ...

Posted on Fri, 08 Nov 2019 22:13:45 -0500 by SetToLoki

redis 5.0 cluster building

In October 2018, Redis released a stable version of 5.0 and introduced various new features. One of them is to give up Ruby's cluster mode and change to Redis cli mode written in C language, which greatly reduces the complexity of cluster construction. Here is a description of cluster building 1. Download redis first ​wget http://download.red ...

Posted on Fri, 08 Nov 2019 16:12:05 -0500 by bennyboywonder

Summary of common configuration of cellery [number of workers configured by cellery and maximum number of tasks performed by a single worker]

setting configuration I use: #!/usr/bin/env python import random from kombu import serialization from kombu import Exchange, Queue import ansibleService serialization.registry._decoders.pop("application/x-python-serialize") broker_url = ansibleService.getConfig('/etc/ansible/rabbitmq.cfg', 'rabbit', 'broker_url') celeryMq = an ...

Posted on Fri, 08 Nov 2019 12:31:05 -0500 by Paddy

What's a Facade? I hope it's useful for PHPer

What is the Facade? At present, it is a class that is used to facilitate the static method call of the original class (undefined static method).The specific implementation of Facade is as follows:First look at the core document:\thinkphp\base.php`//Register static proxy of core classFacade::bind([ facade\App::class => App::class, facade ...

Posted on Fri, 08 Nov 2019 04:22:41 -0500 by unbreakable9