GalaxyDB is a scalable database as a service using sharding written in Go. It is the descendent of our friendly old Traffic Wizard. RIP mate. Like it's parent, this cute munchkin is also religious in it's own way and follows the New Testament found here. Lastly, this is the second assignment for Distributed Systems course taken by Dr. Sandip Chakraborty for Spring-2024.
- Ensure that you have
make
,docker
anddocker-compose
installed. - In the project root folder, run
make
- To stop the containers, run
make stop
We used a hash function, which , after careful testing, returned a balanced output for the loadbalancer, enhancing the overall throughput of the system.
func H(i uint32) uint32 {
i = (((i >> 16) ^ i) * 0x45d9f3b) >> 16 ^ i
return i
}
func assistH(i, j uint32) uint32 {
return H(i + H(j))
}
func hashRequest(i int) int {
return int(assistH(uint32(i), uint32(i)))
}
func hashVirtualServer(i, j int) int {
return int(assistH(uint32(i), uint32(j)))
}
This README documents the performance analysis of a distributed database system under different configurations. The analysis focuses on measuring the read and write times to understand the impact of varying the number of shards, servers, and replicas.
The distributed database system was tested under three different configurations to evaluate its performance:
- Configuration 1: 4 Shards, 6 Servers, 3 Replicas
- Configuration 2: 4 Shards, 6 Servers, 6 Replicas
- Configuration 3: 6 Shards, 10 Servers, 8 Replicas
Each configuration was subjected to 10,000 write operations followed by 10,000 read operations to measure the system's performance.
The test setup involved initializing the distributed database with the specified configuration, performing the write operations, followed by the read operations. The time taken for these operations was recorded to analyze the system's performance under each configuration.
Below are the results showing the read and write times for each configuration. The results are also visualized in the form of graphs to provide a clear comparison.
- Write Time: 23.513784885406494 seconds
- Read Time: 48.415045 seconds
- Write Time: 31.36978554725647 seconds
- Read Time: 44.735289 seconds
- Write Time: 30.403273105621338 seconds
- Read Time: 46.32252900000001 seconds