Project: Software Studio @ cs.hanynag
- Use Docker (10pts)
- Performance Comparison (using arcus) (20pts)
- Use nBase-ARC (20pts)
- Use multi-node (10pts)
- Use Hubblemon (10pts)
- Use nGrinder (10pts)
- Naver Open Source Contribution
Using Docker with arcus, MySQL, nBase-ARC.
API app is simple flask app for performance comparison.
All settings are stored in
settings.json. you can change enviroments for you own service.
Using dockerized images and dockerfiles.
settings.json for docker run.
API App (for performance comparison)
Powered by flask, support simple RestfulAPI for performance comparison.
/initInitialize database, create testset table, and insert some records.
/mysqlSelect some integer from mysql (range 0 - testsize)
/arcusSelect some integer from arcus if missed, select from mysql and add to arcus
/nbaseSelect some integer from nbase if missed, select from mysql and add to nbase
Pulling from public mysql dockerfile(version
5.7, but it can also
There are some enviroments for mysql db.
- MYSQL_ROOT_PASSWORD: password
- MYSQL_USER: maybe
- MYSQL_PASSWORD: password
- MYSQL_DATABASE: ite3068
Pulling from ruo91/arcus and some appendix scripts for memcached server.
arcus/install.sh. It provide arcus to memcached server list and set up zookeeper and memcached.
It automatically run after docker container started.
Arcus is memory cache cloud based on memcached and zookeeper. So Arcus is distributed cache cloud. Therefore Arcus can configure multiple nodes to improve performance.
In this project, use 3 memcached-server on arcus. You can see how many nodes are used in settings.json.
Pulling from hyeongseok05/nbase-arc. Dockerfile prepare all for start nbase-arc, so just start docker container is enough.
nBase-ARC is distributed storage platform using redis and clustering. A cluster consists of several gateways and replication groups, and each replication group has its own storage unit called redis. There is an advantage that the redis API can be used as it is.
In this project use 4-cluster node server.
It’s difficult to compose all of docker container in a single
Because, arcus and memcached require settins after container started.
So, hubblemon run each
To do this, after each container started, process
Script contains below
- Install depedency (It takes time depending on the internet(or repo server) speed)
- Clone hubblemon repository
- Copy each setting
- Install python dependency
- Run server
Hubblemon initially started to monitor Arcus. So it is not very difficult and kind to use with other clients while currently support other clients,
Monitoring is based on a django, web and information about the listener is delivered when the client is connected, and the client executes the information collected by the server to be monitored.
Since hubblemon runs in the container, it can take a very long time to start(In my case, about 5-6m).
In settings.json, you can see
HUBBLEMON environments. This port is the port where HubbleMon runs in each container. And
install.sh script on hubblemon dir is for run hubblemon in each container.
- MySQL: 4584
- Arcus: 4585
- nBase-ARC: 4586
nGrinder supports writing a script that sends an HTTP request and sends it to the agent for testing. The web server receives the HTTP request and can communicate with the mysql server or the arcus server. Now you can actually write those scripts through nGrinder to compare performance differences between using the mysql server directly and the arcus server.
You can test the performance in nGrinder by calling the api created in the flask app above.
Check my results in
The performance test of
mysql ngrinder results
arcus ngrinder result
nbase ngrinder result
nBase-ARC is fastest because memory cache is faster than access raw db. Over 10 times faster than mysql. Now that mysql is running too slow, arcus is slowing down. If you increase the experiment time or if mysql is fast enough, the acus will be even faster.
Just run application, it uses docker service.
pip3 install -r api/requirements.txt python3 app.py start // To setup arcus memcached server docker exec -it arcus-admin /bin/bash -c /opt/install.sh // To setup hubblemon, each container docker exec -it arcus-memcached-1 /bin/bash -c /opt/install.sh docker exec -it mysql /bin/bash -c /opt/install.sh docker exec -it nbase-arc /bin/bash -c /opt/install.sh // You can run this command in other shell after above execution print `Docker started!` // Waiting hubblemon takes too long, You do not have to wait for hubblemon to start the api server. python3 api/app.py
for stop service,
python3 app.py stop