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 discusses messaging queues and platforms. It begins with an introduction to messaging queues and their core components. It then provides a table comparing 8 popular open source messaging platforms: Apache Kafka, ActiveMQ, RabbitMQ, NATS, NSQ, Redis, ZeroMQ, and Nanomsg. The document discusses using Apache Kafka for streaming and integration with Google Pub/Sub, Dataflow, and BigQuery. It also covers benchmark testing of these platforms, comparing throughput and latency. Finally, it emphasizes that messaging queues can help applications by allowing producers and consumers to communicate asynchronously.
This document discusses messaging queues and platforms. It begins with an introduction to messaging queues and their core components. It then provides a table comparing 8 popular open source messaging platforms: Apache Kafka, ActiveMQ, RabbitMQ, NATS, NSQ, Redis, ZeroMQ, and Nanomsg. The document discusses using Apache Kafka for streaming and integration with Google Pub/Sub, Dataflow, and BigQuery. It also covers benchmark testing of these platforms, comparing throughput and latency. Finally, it emphasizes that messaging queues can help applications by allowing producers and consumers to communicate asynchronously.
2. Most of our systems are big “Future transformers”
- Marius Eriksen
3. predictable performance is difficult to achieve. In a predictable system,
worst-case performance is crucial; average performance not so much.
... predictable performance is difficult to achieve.
In a predictable system, worst-case performance
is crucial; average performance not so much.
- Peter Schuller
4. predictable performance is difficult to achieve. In a predictable system,
worst-case performance is crucial; average performance not so much.
It’s with the intent of modeling a world where the
Twitters, Googles, and Facebooks are no longer
superpowers… just power
- Aurora
31. Futuresの値の取得 get
Futureは、ある種のコンテナーである。 trait Future[A]
それは、empty, full, failedの三つの状態を取る。我々
は、それを待つことができる。その値は getで取得できる。
val f: Future[A]
val result = f()
f.get() match {
case Return(res) => ...
case Throw(exc) => ...
}
ただ、いつ get するのか? せっかく非同期にしたのに、
get の利用は、あまり意味がない
77. Filterは、積み重ねられる。
val timeout: Filter[…]
val auth: Filter[…]
val service: Service[…]
timeout andThen auth andThen service
def andThen[A](g: (R) ⇒ A): (T1) ⇒ A
Composes two instances of Function1 in a new
Function1, with this function applied first.
def compose[A](g: (A) ⇒ T1): (A) ⇒ R
Composes two instances of Function1 in a new
Function1, with this function applied last.
97. Manhattan, our real-time,
multi-tenant distributed
database for Twitter scale
April 2, 2014 By Peter Schuller,
Core Storage Team
https://blog.twitter.com/2014/manhattan-
our-real-time-multi-tenant-distributed-
database-for-twitter-scale
抄訳
118. Storage as a service
既存のデータベースで我々が見てきた共通の問題は、そ
れが、ユースケースのある特別な集まりに対して、設定さ
れ管理されるようにデザインされていることだった。
Twitterの新しい内部サービスが成長するにつれ、我々
が認識したのは、そうしたことは、我々のビジネスには効
率的ではないということだった。
我々のソリューシンは、storage as a serviceという
ものだ。我々は、エンジニアと運用者のチームに、エンジ
ニアをコントロールする、完全なセルフサービスのストレー
ジ・システムを構築することによって、大きな生産性の改
善を提供してきた。
120. Storage as a service
エンジニアは、彼らのアプリケーションが必要とするもの(
ストレージのサイズ、一秒あたりのクエリー等)を与え、ハ
ードウェアがインストールされスキーマが設定されるのを
待つことなしに、瞬時にストレージの利用を開始すること
ができる。
会社内の顧客は、我々の運用チームが管理するマルチ・
テナントな環境で実行する。セルフサービスとマルチ・テナ
ントのクラスターを管理することは、ある種のチャレンジだ
った。それで、我々は、このサービス層を、第一級の特徴
として扱った。
121. Storage as a service
我々は顧客に、データと処理を、見える形で提供した。
quotaの機能強化とrate制限を組み込んで、エンジニア
が、彼らの定義された制限を超えた時には警告を受け取る
ようにした。我々のすべての情報は、分析と報告のため
Capacity and Fleet Managementチームに、直接送ら
れる。
エンジニアが新しい特徴をローンチすることを容易にするこ
とで、我々が見たのは、実験が活発に立ち上がり、新しい
ユースケースが急速に増えたということだった。これらをう
まくハンドルするために、これらのデータを、コスト分析に
結びつける内部のAPIを開発した。これによって、どのユー
スケースが最もビジネスにコストをかけ、また、どのユース
ケースがおきそうもないかを決定することができた。
149. import sys
import time
def main(argv):
SLEEP_DELAY = 10
# Python ninjas - ignore this blatant bug.
for i in xrange(100):
print("Hello world! The time is now: %s. Sleeping for %d secs" % (
time.asctime(), SLEEP_DELAY))
sys.stdout.flush()
time.sleep(SLEEP_DELAY)
if __name__ == "__main__":
main(sys.argv)
hello_world.py
178. The Mesosphere Datacenter
Operating System
「自分のデータセンターやクラウドを、Mesosphere
データセンター・オペレーティング・システムで、自動
運転させる。時間とお金を節約して、ソフトウェアはよ
り早く配布する。」
https://mesosphere.com/
179. A New Kind of Operating
System
Mesosphere データセンター・オペレーティング・システ
ム (DCOS)は、新しい種類のオペレーティング・システム
である。それは、物理サーバー、クラウド・ベースのデータ
センターのサーバーをまたいで、その上で、あらゆるバー
ジョンのLinuxが走る。
Killer Apps User Interface Programmable
Datacenter
186. PaaS and
Long Running Big data processing Batch scheduling Data storage
“Framework on Mesos” https://goo.gl/1oDvTc
187. Mesos利用の拡大
-- Mesosphere Blog タイトルから --
The Mesosphere Datacenter Operating System
is now generally available
Get Mesos-DNS up and running in under 5
minutes using Docker
Building real-time data flows with Kafka on
Mesos
Cassandra on Mesos: Performance +
Reliability
Deploying Kubernetes on Mesos
It’s easier than ever to scale like Google
without being Google
https://mesosphere.com/blog/
188. Mesos利用の拡大
-- Mesoshere Blog タイトルから --
Launching thousands of Docker containers
with DCOS on Azure
Join the DCOS public beta on Microsoft Azure
and AWS
Apple details how it rebuilt Siri on Mesos
Making Kubernetes a first-class citizen on the
DCOS
MySQL on Mesos: today’s database meets
tomorrow’s datacenter
https://mesosphere.com/blog/
189. “Mesosphereは、Googleスケールの計算能力を万
人にもたらす。”
Abdur Chowdhury, Former Chief Scientist, Twitter
“Mesosphereは、クラウド・コンピューティングの避
けられない運命だ。”
Brad Silverberg, Fuel Capital
“Mesosphereは、開発者にとってのブレークスルー
だ。数千のDropletでさえ、一つのコンピュータのよう
に管理するその能力は、とてもエキサイティングなも
のだ。”
Ben Uretsky, CEO and Co-founder of DigitalOcean
192. Google, Borgの情報公開
今年の4月、Googleは、Borgの情報を初めて公開した。
“Large-scale cluster management at Google
with Borg” https://goo.gl/aN03bI
この発表に対して、Auroraのアーキテクトのコメントを含
む記事が、出ている。“Google Lifts the Veil on
Borg, Revealing Apache Aurora’s
Heritage”http://goo.gl/Nv8ZIQ
僕には謎だったBorgの名前の由来だが、それは、Star Trekに
登場する「宇宙種族のひとつ。蜂や蟻をモチーフにした社会的集
合意識を持っているとされ、中央制御装置としてのQueenがいる
」とのこと。Facebookで友人から教えてもらった。納得。
193. Google Borg
Google’s Borg system
is a cluster manager
that runs hundreds of
thousands of jobs,
from many thousands
of different applications,
across a number of
clusters each with up
to tens of thousands of
machines
数十万のジョブ
数千のアプリケーション
数万のマシン
225. Scheduler
offerRescinded
/**
* オファーが、もはや有効でない場合に呼び出される。
* (例えば、スレーブが失われたり、他のフレームワークがリソースを
* オファーにつかった場合とか) どんな理由であれ、オファーが撤回され
* ないならl(メッセージが落ちる、あるいは、フレームワークが失敗する等で)
* フレームワークはost or another framework used resources in the offer). If for
* 妥当ではないオファーを使ってタスクを起動しようとしたフレームワークは、
* このタスクについて、TASK_LOSTステータス更新を受け取る。
*/
def offerRescinded(
driver: SchedulerDriver,
offerId: OfferID): Unit = {
log.info("Scheduler.offerRescinded [%s]" format offerId.getValue)
}