catatsuy / isucon11q

0 stars 0 forks source link

作業リスト #1

Open catatsuy opened 3 years ago

catatsuy commented 3 years ago

インフラ担当

アプリケーション担当1

アプリケーション担当2

meihei3 commented 3 years ago
CREATE TABLE `isu` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `jia_isu_uuid` char(36) NOT NULL,
  `name` varchar(255) NOT NULL,
  `image` longblob DEFAULT NULL,
  `character` varchar(255) DEFAULT NULL,
  `jia_user_id` varchar(255) NOT NULL,
  `created_at` datetime(6) DEFAULT current_timestamp(6),
  `updated_at` datetime(6) DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
  PRIMARY KEY (`id`),
  UNIQUE KEY `jia_isu_uuid` (`jia_isu_uuid`)
) ENGINE=InnoDB AUTO_INCREMENT=83 DEFAULT CHARSET=utf8mb4;

CREATE TABLE `isu_association_config` (
  `name` varchar(255) NOT NULL,
  `url` varchar(255) NOT NULL,
  PRIMARY KEY (`name`),
  UNIQUE KEY `url` (`url`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

CREATE TABLE `isu_condition` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `jia_isu_uuid` char(36) NOT NULL,
  `timestamp` datetime NOT NULL,
  `is_sitting` tinyint(1) NOT NULL,
  `condition` varchar(255) NOT NULL,
  `message` varchar(255) NOT NULL,
  `created_at` datetime(6) DEFAULT current_timestamp(6),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=70138 DEFAULT CHARSET=utf8mb4;

CREATE TABLE `user` (
  `jia_user_id` varchar(255) NOT NULL,
  `created_at` datetime(6) DEFAULT current_timestamp(6),
  PRIMARY KEY (`jia_user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
meihei3 commented 3 years ago
+------------------------+--------+------------+----------+---------+----------+
| table_name             | engine | table_rows | total_mb | data_mb | index_mb |
+------------------------+--------+------------+----------+---------+----------+
| isu_condition          | InnoDB |      70473 |       12 |      12 |        0 |
| isu                    | InnoDB |         71 |        2 |       2 |        0 |
| isu_association_config | InnoDB |          1 |        0 |       0 |        0 |
| user                   | InnoDB |         13 |        0 |       0 |        0 |
+------------------------+--------+------------+----------+---------+----------+
4 rows in set (0.000 sec)
sakushin774 commented 3 years ago

alp

sudo cat /var/log/nginx/access.log | alp ltsv --sort=sum -m "^/api/isu/[-a-zA-Z0-9]+$","^/api/isu/[-a-zA-Z0-9]+/icon$","^/api/isu/[-a-zA-Z0-9]+/graph$","^/api/condition/[-a-zA-Z0-9]+$","^/isu/[-a-zA-Z0-9]+$","^/isu/[-a-zA-Z0-9]+/condition$","^/isu/[-a-zA-Z0-9]+/graph$","^/assets/" --reverse --filters 'Time > TimeAgo("10m")' | notify_slack -snippet -filetype txt
sakushin774 commented 3 years ago

CPU

メモリ

4GB

              total        used        free      shared  buff/cache   available
Mem:          3.6Gi       520Mi       124Mi       0.0Ki       3.0Gi       2.9Gi
Swap:            0B          0B          0B