GithubHelp home page GithubHelp logo

isabella232 / isucon9-qualify Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sai-lab/isucon9-qualify

0.0 0.0 0.0 22.51 MB

ISUCON9予選

Home Page: http://isucon.net/archives/53570241.html

License: MIT License

Shell 0.07% JavaScript 0.30% Ruby 5.33% Python 6.36% Perl 8.90% PHP 11.29% Go 33.87% TypeScript 33.23% CSS 0.10% Makefile 0.12% HTML 0.38% Dockerfile 0.04%

isucon9-qualify's Introduction

isucon9-qualify

ディレクトリ構成

├── bench        # ベンチマーカーなどが依存するパッケージのソースコード
├── cmd          # ベンチマーカーなどのソースコード
├── docs         # 運営が用意した各種ドキュメント
├── initial-data # 初期データ作成
├── provisioning # セットアップ用ansible
└── webapp       # 各言語の参考実装

アプリケーションおよびベンチマーカーの起動方法

こちらのblogでも紹介しています。参考にしてください http://isucon.net/archives/53805209.html

前準備

# 初期データ作成
$ cd initial-data
$ make

# 初期画像データダウンロード

$ cd webapp/public
# GitHub releases から initial.zip をダウンロード
$ unzip initial.zip
$ rm -rf upload
$ mv v3_initial_data upload

# ベンチマーク用画像データダウンロード

$ cd initial-data
# GitHub releases から bench1.zip をダウンロード
$ unzip bench1.zip
$ rm -rf images
$ mv v3_bench1 images

$ make
$ ./bin/benchmarker

ベンチマーカー

Version: Go 1.13 or later

実行オプション

$ ./bin/benchmarker -help
Usage of isucon9q:
  -allowed-ips string
        allowed ips (comma separated)
  -data-dir string
        data directory (default "initial-data")
  -payment-port int
        payment service port (default 5555)
  -payment-url string
        payment url (default "http://localhost:5555")
  -shipment-port int
        shipment service port (default 7000)
  -shipment-url string
        shipment url (default "http://localhost:7000")
  -static-dir string
        static file directory (default "webapp/public/static")
  -target-host string
        target host (default "isucon9.catatsuy.org")
  -target-url string
        target url (default "http://127.0.0.1:8000")
  • HTTPとHTTPSに両対応
    • 証明書を検証するのでHTTPSは面倒
  • 外部サービス2つを自前で起動するので、いい感じにするならnginxを立てている必要がある
  • nginxでいい感じにするなら以下の設定が必須

外部サービス

実行オプション

$ ./bin/shipment -help
Usage of shipment:
  -data-dir string
        data directory (default "initial-data")

paymentはオプションなし。

注意点

nginxでいい感じにするなら以下の設定が必須

  • proxy_set_header Host $http_host;
    • shipmentのみ必須
  • proxy_set_header X-Forwarded-Proto "https";
    • HTTPSでないなら不要

webapp 起動方法

cd webapp/sql

# databaseとuserを初期化する
mysql -u root < 00_create_database.sql

# データを流し込む
./init.sh

cd webapp/go
make
./isucari

運営側のブログ

技術情報などについても記載されているので参考にしてください。

サポートするMySQLのバージョン

MySQL 5.7および8.0にて動作確認しています。

ただし、nodejsでアプケーションを起動する場合、MySQL 8.0の認証方式によっては動作しないことがあります。 詳しくは、 isucon#316 を参考にしてください

使用データの取得元

isucon9-qualify's People

Contributors

catatsuy avatar sota1235 avatar kazeburo avatar cubicdaiya avatar shoma avatar walf443 avatar owatan avatar chibiegg avatar gfx avatar ykzts avatar nagarei avatar pikapika2 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.