cockroachDB-report
1 minute read ∼ Filed in : practise1. Allocated tasks
xingnaili: Implement the first 4 transcations in driver for both workloads, do some optimizaitons. and cluster settings
Daifei: Implement the last 4 transcations in driver for both workloads, do some optimizaitons. and cluster settings
2. Completed tasks
cluster setting
- install and run cockraochDB cluster on servers
schema design
- design the schema for workloadA and B
- De-normalization to faciliate reads workloads
- Build indexs on each table, for write heavy transaction, use UUID as primary key to avoid hot pot
- For table with many read-only operations over the application, like table “item”, we manually split it to 5 ranges.
- Assign frequently updated column to a single family for each table
- Enable multiple advanced setting like experimental_enable_hash_sharded_indexes, load-splitting threshold
Driver implementation
- Analys the each table’s reques load on 8 transactions.
- Implemented 8 transactions
- Do some optimizations based on following rules:
- Make sure each sql use indexs, avoid full-scan
- Avoid multiple client-server exchanges per transaction, group select, insert etc together in single SQL, using “with…”
- For insert operation, use batch insert in single sql.
- For update and then select scenario, using returing keyword
- For read-only tables, try with “follower_read” but failed. It ask for licences
- Record the evluation matrix, including number of transactions, latency, throughput etc
3. In-progress tasks
- Write the script to launch multiple instances of driver on different servers and test performance
- Tunning configurations to make the workload more balance
- Try to find some settings such that it only facilitate either read or write. And use it to distinguished the driver or schema design between workloadA and workloadB.