This document summarizes a microservices meetup hosted by @mosa_siru. Key points include:
1. @mosa_siru is an engineer at DeNA and CTO of Gunosy.
2. The meetup covered Gunosy's architecture with over 45 GitHub repositories, 30 stacks, 10 Go APIs, and 10 Python batch processes using AWS services like Kinesis, Lambda, SQS and API Gateway.
3. Challenges discussed were managing 30 microservices, ensuring API latency below 50ms across availability zones, and handling 10 requests per second with nginx load balancing across 20 servers.
This document summarizes a microservices meetup hosted by @mosa_siru. Key points include:
1. @mosa_siru is an engineer at DeNA and CTO of Gunosy.
2. The meetup covered Gunosy's architecture with over 45 GitHub repositories, 30 stacks, 10 Go APIs, and 10 Python batch processes using AWS services like Kinesis, Lambda, SQS and API Gateway.
3. Challenges discussed were managing 30 microservices, ensuring API latency below 50ms across availability zones, and handling 10 requests per second with nginx load balancing across 20 servers.
13. (その2) 非正規化
uid time Action Type Sex type age
1000222 ****** comment F 23
1022939 ****** comment M 35
• joinしたい行動ログにあらかじめ追加しておく。
• あらゆるステータス情報を追加するのは”無理”があるの
で、必要なものを吟味して追加。
13
18. 安易な方法(その1)
logrotate + rsync (daily)
Web servers
Hadoop Cluster
Server A
node A
Server B
node B
Server C node C
……
…
……
Server D …… hogelog.20110311.gz
Server E
ログが収集されるまで時間がかかるので、直
近のログ集計が出来ない。
…
18
19. 安易な方法(その2)
1アクセス(1 ログ)ごとに送信
Web servers
Hadoop Cluster
Server A
2011-03-11 *****
node A
Server B
node B
Server C node C
…
Server D
2011-03-11 *****
Server E
小さなfile が大量に出来てしまて、(恐らく)大
…
変なことになる。 19
20. そこで…
中継サーバを設置。一旦fileをマージ。
Web servers
Server A Hadoop Cluster
中継 servers
node A
Server B
node B
Server C node C
…
…
Server D
それでも1アクセスごとにログを投げると、アク
Server E セス毎に「コネクション確立コスト」が…
20
…
21. さらに…
webサーバでqueue処理. ある程度まとめてbulkで投げる
Web servers Hadoop Cluster
中継 servers
Server A
node A
Server B node B
node C
…
Server C
…
Server D 2011-03-11 *****
2011-03-11 *****
2011-03-11 *****
Server E
……
21