Tag:Slice

  • Implementation of java web file upload and download example

    Time:2021-10-2

    Core principles: The core of the project is file block upload. The front and rear ends should be highly coordinated. The two sides need to agree on some data to complete the blocking of large files. We should focus on the following problems in the project. How to slice; How to compose a file; Interrupt […]

  • Mongodb slice configuration

    Time:2021-10-2

    Community Download Center:https://www.mongodb.com/downl…Official installation manual:https://docs.mongodb.com/manu… Download decompression wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1604-3.6.2.tgz tar zxvf mongodb-linux-x86_64-ubuntu1604-3.6.2.tgz mv mongodb-linux-x86_64-ubuntu1604-3.6.2 ~/mongo Configure environment variables echo “export PATH=/root/mongo/bin:\$PATH” >> ~/.bashrc source ~/.bashrc Verify version mongo -version If the version number is not displayed, there is a problem in the previous steps Create folders for data and logs mkdir -p /data/db/27017 mkdir -p […]

  • Those things of memory swallowing beast — Architecture & three high guarantees

    Time:2021-9-30

    Series catalog What happened to the memory swallowing beast — get to know it Those things of memory elasticsearch — data structure and clever algorithm Those things of memory swallowing beast — Architecture & three high guarantees Those things about the memory swallowing beast — the principle of writing and retrieval Those things about memory […]

  • Build mongodb sharding / partition / cluster environment

    Time:2021-9-30

    Build mongodb sharding / partition / cluster environment 1. Install mongodb Three machines Turn off firewall systemctl stop firewalld.service 192.168.252.121 192.168.252.122 192.168.252.123 mongos mongos mongos config server config server config server Shard Server1 master node Shard Server1 secondary node Shard Server1 arbitration Shard server2 arbitration Shard server2 master node Shard server2 secondary node Shard Server3 […]

  • Phase III day14 redis fragmentation mechanism redis sentinel mechanism

    Time:2021-9-30

    Redis fragmentation mechanism ============= 1.1 why do you need a fragmentation mechanism If you need to store a large amount of memory data, if only one redis is used, the efficiency of redis cannot be guaranteed. A lot of time is wasted in addressing. Therefore, a mechanism is needed to meet this requirementThe fragmentation mechanism […]

  • HTTP fragment request – Python fragment download file

    Time:2021-9-29

    source file http://theday.guohongfu.top/letter.txtThe content isabcdefghijklmnopqrstuvwxyz Get the contents of the 20th byte and later import requests url = ‘http://theday.guohongfu.top/letter.txt’ headers1 = { ‘range’: “bytes = 20 -” # get the data of the 20th byte and later } response = requests.get(url, headers=headers1) print(‘data={}’.format(response.content.decode())) # abcdef #Results #data=uvwxyz set upIf-MatchDetermine whether the file has changed between […]

  • Implementation of slice set of go

    Time:2021-9-28

    Slice Slicing is similar to arrays, which can be understood as dynamic arrays. Slicing is based on array, and its bottom layer is an array. You can get a slice by arbitrarily separating the array. Now let’s better understand it through an example, which is also based on the previous array. Generate slices based on […]

  • Clickhouse cluster construction (I)

    Time:2021-9-24

    The mountains and rivers are far away, and the falling flowers and wind and rain hurt the spring even more. ClickHousesummary What is?ClickHouse? ClickHouseIt’s RussianYandexOpen source column storage database in 2016(DBMS)It is mainly used for online analysis and query processing(OLAP), able to useSQLQuery and generate analysis data report in real time. What is columnar storage? […]

  • When the amount of data is large, you must divide the tables, databases and tables. Introduction to sharding JDBC and project practice

    Time:2021-9-18

    Recently, the data volume of many tables in the project is increasing, which leads to some database performance problems. Therefore, we want to use some database and table middleware to realize the implementation of automatic database and table. Research down, foundSharding-JDBCAt present, the most mature and widely usedClient component of Java sub database and sub […]

  • Beijing Taobao project day14

    Time:2021-9-8

    1. Redis persistence strategy 1.1 what is persistence Note: the redis operating environment is in memory. If the redis server is shut down, the memory data will be lostRequirements: how to save memory data?Solution: memory data can be persisted to disk regularly Persistence policy rules:When redis is running normally, the data will be saved to […]

  • Es working principle

    Time:2021-9-7

    Write process (1) The node to which the request reaches is called the coordination node. The coordination node routes the document according to a specific routing algorithm, that is, forwards the request to the specified node (routing algorithm: hash (DOC))_ id) % num_ primary_ shard)(2) The primary shard of the node processes the request and […]

  • Redis persistence operation

    Time:2021-9-6

    1. Redis persistence strategy 1.1 what is persistence Note: the redis operating environment is in memory. If the redis server is shut down, the memory data will be lostRequirements: how to save memory data?Solution: memory data can be persisted to disk regularlyPersistence policy rules:When redis is running normally, the data will be saved to the […]