Giter Site home page Giter Site logo

bdt_fp's Introduction

Final Project BDT

I. Arsitektur

arsitektur

PD Cluster :

  • PD 1, IP 10.10.17.29
  • PD 2, IP 10.10.17.30
  • PD 3, IP 10.10.17.31

TiKV Cluster :

  • TiKV 1, IP 10.10.17.32
  • TiKV 2, IP 10.10.17.33
  • TiKV 3, IP 10.10.17.34

TiDB Cluster :

  • TiDB, IP 10.10.17.35

Monitoring :

  • Prometheus Pushgateway, IP 10.10.17.36
  • Prometheus, IP 10.10.17.37
  • Grafana, IP 10.10.17.38

Web Server :

  • Web Server, IP 10.10.17.39

II. Docker Command

Cara Menjalankan Service (Node)

docker-compose build

docker-compose --compatibility up
# atau
docker-compose --compatibility up -d

Cara Menjalankan/Menghentikan Single Service (Node)

docker-compose start <service>
docker-compose stop <service>

# contoh
docker-compose start tikv1
docker-compose stop tikv1

Cara Menghancurkan Semua Service (Node)

docker-compose down
docker volume rm bdt_fp_pd1 bdt_fp_pd2 bdt_fp_pd3 bdt_fp_tikv1 bdt_fp_tikv2 bdt_fp_tikv3 bdt_fp_prometheus bdt_fp_grafana bdt_fp_web_server

III. Uji Performa & Failover

Uji performa dengan JMeter

Cara Penggunaan

  1. Download JMeter
  2. Tambahkan Thread Group, HTTP Cookie Manager, HTTP Request Defaults, HTTP Request, dan Summary Report
  3. Pada HTTP Request Defaults ganti Server Name dengan lokasi wordpress yang telah diinstall
  4. Pada HTTP Request pilih path dari post yang ada di wordpress
  5. Jalankan testing

Hasil

  1. Pada 100 Client jmeter 100

  2. Pada 500 Client jmeter 500

  3. Pada 1000 Client jmeter 1000

Uji performa dengan Sysbench

Cara Penggunaan

  1. Masuk ke node testing_client
    docker-compose.exe exec testing_client bash
  2. Ganti directory ke ~/sysbench
    cd ~/sysbench
  3. Jalankan perintah berikut
    ./run.sh point_select prepare 16
    ./run.sh point_select run 16 &
    # Angka 16 adalah jumlah thread yang digunakan
  4. Lihat hasil pada file ~/sysbench/point_select_run_jumlahThread.log
    tail -f ~/sysbench/point_select_run_16.log
  5. (Opsional) Untuk menghentikan service tidb/pd/tikv dengan cara berikut
    docker-compose stop tikv1

Hasil

  1. Dengan 3 PD Server + 3 TiKV Server sysbench 3pd 3tikv

  2. Dengan 2 PD Server + 3 TiKV Server sysbench 2pd 3tikv

  3. Dengan 3 PD Server + 2 TiKV Server sysbench 3pd 2tikv

IV. Cara Akses Aplikasi

Webserver

  • Webserver dapat dibuka dengan mengakses localhost
  • Pastikan sebelum menjalankan docker-compose up port 80 tidak sedang digunakan!
  • Tampilan reservasi

Grafana

  • Grafana dapat dibuka melalui localhost:3000
  • User password yang dapat digunakan
    Username : admin
    Password : admin
    
  • Pastikan sebelum menjalankan docker-compose up port 3000 tidak sedang digunakan!
  • Tampilan grafana

TiDB

  • TiDB dapat diakses melalui localhost:4000
  • Pastikan sebelum menjalankan docker-compose up port 4000 dan 10080 tidak sedang digunakan!
  • User password yang dapat digunakan
    Username : root
    Password (empty) : 
    

Prometheus

  • Prometheus dapat diakses melalui localhost:9090
  • Pastikan sebelum menjalankan docker-compose up port 9090 tidak sedang digunakan!

bdt_fp's People

Contributors

anantadwi13 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.