API s commonly used in Redis - are you really familiar with Redis?

For a long time, Redis, as a Nosql database, has been widely used in a variety of projects due to its function of frying chickens and cows. I didn't think much of Redis before, but now I like it more and more. It is often used to store some common data, such as user id, session, user menu permission, me ...

Posted by Hotkey on Sat, 18 Jan 2020 11:34:07 +0100

Distributed ID - snowflake algorithm

background With the increasing business volume, the division of database is becoming more and more detailed, and the concept of sub database and sub table is also gradually implemented. The generation of primary key ID such as auto increase primary key or sequence no longer meets the demand, so the ...

Posted by rallokkcaz on Sat, 18 Jan 2020 10:12:11 +0100

Simple building of LNMP environment

1. The user initiates the request through http protocol, and the request will first arrive at Nginx in LNMP architecture 2.Nginx will match the Location rule according to the user's request 3.Location if the matching request is static, it will be read by Nginx and returned directly locally 4.Location if ...

Posted by Toonster on Fri, 17 Jan 2020 14:16:52 +0100

Solve @ MapperScan scanning package mixed with @ Service and other problems

Problem description @MapperScan annotation is generally configured to use dao or mapper's scanning package to operate the database, which is generally an interface. If there are other interfaces in dao layer, such as @ Service, an error will be reported Solution 1 Remove the service package. The met ...

Posted by malam on Wed, 15 Jan 2020 13:35:10 +0100

Propagation mode in database transaction

Promotion "required: if there is no transaction at present, a new transaction will be created. If there is a transaction at present, the transaction will be added. This setting is the most commonly used setting. Promotion_supports: supports the current transaction. If there is a transaction, jo ...

Posted by hailam on Wed, 15 Jan 2020 13:26:19 +0100

Thread asynchronous processing - state synchronization

Share a single thread for state processing without MQ at work Recently, a third-party interface for contract signing is needed. Because the processing response of this interface is slow and the request times out every time, a compensation interface, that is, the state synchronization interface, is nee ...

Posted by bogha on Wed, 15 Jan 2020 06:59:32 +0100

MHA High Availability Configuration and Failover for MySQL

Preface:Servers running the same service are combined to be called clustersCentralized clusters: master, slave,MHA is used to resolve cluster master downtime.MMM Cluster Architecture: There are two master serversOverview of MHA DeNA youshimaton (now a Facebook company) in Japan A set of excellent high-availability software for failover and ma ...

Posted by dicamille on Mon, 13 Jan 2020 19:00:43 +0100

JDBC principle and basic operation

1. JDBC principle 1. JDBC API: provides various operation providers, connection statement Preparedstatement resultset; 2. JDBC Driver Manager: manage different data drivers; 3. All kinds of database drivers: database drivers provided by corresponding database manufacturers, which link to directly oper ...

Posted by TapeGun007 on Mon, 13 Jan 2020 14:06:30 +0100

Consumption and simple optimization of the number of Oracle database connections

Observe the indicators and check the connection consumption --View session session: select * from v$session where username is not null select username,count(username) from v$session where username is not null group by username --View current connections select count(*) from v$process; --View maximu ...

Posted by Sulman on Mon, 13 Jan 2020 12:49:36 +0100

Django RESTFul (interface application)

Django interface application Written in front 1. Try to write an interface 1.1 new django project 1.1.1. First, create a new django project in pycharm 1.1.2 write driver (used to connect mysql) 1.1.3 new database 1.1.4 migration 1.1.5 login database 1.2 first test whether django can start normall ...

Posted by andyhajime on Sun, 12 Jan 2020 12:20:50 +0100