Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Developers Summit 2020 - 13-A-5

k.yanagimoto
February 13, 2020

Developers Summit 2020 - 13-A-5

k.yanagimoto

February 13, 2020
Tweet

More Decks by k.yanagimoto

Other Decks in Technology

Transcript

  1. 2 Who are we? Koichi Yanagimoto (@kyanagimoto) 楽天株式会社 Software Engineer

    Ruby好き スノボ好き Nikotama.rbを主催 Yosuke Arai (@yosukearai) ⽇本マイクロソフト Cloud Solution Architect 動画配信技術勉強中 ベースを弾いてます ノドにポリープができました、、
  2. 3 About Our Team and Today’s topics Service Operation Kaizen

    Group Our mission “少ない⼈数でより多くのサービスの運⽤を︕” 11 Services/Group Today’s Target Service DMC (画像Storage/APIs) Get / Store / Delete… About 10 Functions
  3. 4 1.Current Structures and problems 2.Network Cost Issue 3.Database Issue

    4.Data Transfer issue 5.Microservice from Monolith 6.CI/CD Pipeline 7.Next Actions
  4. 11 Try 2 – Database issue いくつか問題点が出てきてしまった… 1. Azure MySQLは、HW障害などにより、予告なしに中断する

    2. Azure MySQLは、⽉イチ程度メンテナンスのため停⽌→再起動 (停⽌時間10数秒、不定回数、事前予告なし、⽇時指定も不可) 完璧に想定外︕w (その当時は…) 楽天DCのMySQL, スケジュール調整もできるし、⽉イチでは落ちない… (あと、AzureMySQLより値段安め…)
  5. … Azure Storage MySQL Server Secure container X MySQL Server

    Secure container PostgreSQL: 5432 MySQL: 3306 MySQL Client Azure 3 copies of data for data reliability Azure Database for MySQL ⾼可⽤性、計画メンテナンス • Built-in HA – 冗⻑ノードへのfail-over実施 – アプリケーションは通常最⼤で 60 秒 未満の間、Databaseへの接続を失う • 通知 – [Preview in East US and UK South] Service health事前通知 • メンテナンスWindow – 現状機能無し – (参考) メンテナンスwindowを指定できる 他サービス SQL Datawarehouse, Azure Redis, Azure VM (Dedicated host) https://docs.microsoft.com/ja-jp/azure/mysql/howto-troubleshoot-common-connection-issues https://docs.microsoft.com/ja-jp/azure/mysql/concepts-monitoring#service-health
  6. 16 OFFLINE data transfer: Azure Databox Family 80TB \28,000+\1,680/⽇+送料 GA

    At Japaneast/west Not GA At Japaneast/west 7TB \5,600+\1,120/⽇+送料 770TB \448,000+\11,200/⽇+送料 https://azure.microsoft.com/ja-jp/services/databox/data/
  7. 17 Gave up to use Azure Databox… ⾊々と気をつかって原始的な感じでゴリゴリ… • Networkの帯域を使い切っちゃう恐れがあるの

    で、LoadBalancerに紐づけて、必要以上に負荷 をかけないように • ActiveStorageがmetadataの更新している間、 Imageを掴んでいて、メモリリーク… • ActiveStorage側でheaderの値を渡していないの で、今azure-core側のdefaultのheader情報⼊って る…w (PRチャンス?) • Long Long Journey…
  8. Azure ポータルから申し込める⽉額課⾦ のマネージド ハードウェア サービス Azure Storage オンプレミス データ SMB/NFS

    Share Storage Gateway Azure IoT Edge Azure Stack Edge ONLINE data transfer: Azure Stack Edge https://azure.microsoft.com/ja-jp/pricing/details/databox/edge/
  9. 22 Service Mesh - Istio • With Helm2 • AZ-AKS

    with Kubenet CNI => Failed… => azure CNIを利⽤ • 今後、istioのInstall周り、変化あり? • Kiali : Network周り確認できるので便利。 • Jaeger, ElasticAPM • Prometheus / Grafana / AlertManager / Slack
  10. Dapr: Build apps using any language with any framework Any

    code or framework… Functions S e r v i c e s w r i t t e n i n .NET Core Microservice application Service-to- service invocation State management Publish and subscribe Resource bindings & triggers Actors Distributed tracing Extensible… HTTP/gRPC APIs Any cloud or edge infrastructure https://www.publickey1.jp/blog/19/dapr.html https://github.com/dapr/dapr/wiki/FAQ#how-does-dapr-work-with-service-meshes
  11. Resiliency and SLA in Azure VM SLA 99.9% 可⽤性セット •

    冗⻑構成のためのVMグ ループ。複数の更新ド メインと障害ドメイン を備える 可⽤性ゾーン(AZ) • 独⽴した電源、冷却⼿段、 ネットワークを備えた、 1以上のデータセンター ペアリージョン • ペアリージョンの両⽅を 同時にメンテナンスしない • 複数リージョン障害時、各 ペアの少なくとも⽚⽅を 優先復旧 VM SLA 99.95% VM SLA 99.99% Regions 54 Azure VM SLA: https://azure.microsoft.com/ja-jp/support/legal/sla/virtual-machines/v1_9/ 障害ドメイン • 電源とNW switchを共有す るVMグループ。最⼤3ドメ イン 更新ドメイン • 同時に再起動されるVMグ ループ。5~最⼤20ドメイ ン n データセンターの 全体障害への対応 n データセンターの 部分障害への対応 n マルチリージョン 構成 n シングルVM構成 での可⽤性
  12. Multi-region architecture in Azure • 負荷分散 – マルチリージョン負荷分散 • Azure

    Front door (Managed Global L7 LB) • Azure Traffic Manager (Managed DNS LB) – リージョン内負荷分散 • Application Gateway (Managed L7 LB) – Internal load balancing • Azure Load Balancer (Managed L4 LB) • レプリケーション – VM: Azure Site Recovery – Storage: Geo冗⻑Storage(GRS) – Database (MySQL): Azure MySQL geo replication (Geo backup & restore) Azure Front Door https://docs.microsoft.com/ja-jp/azure/frontdoor/front-door-overview https://docs.microsoft.com/ja-jp/azure/traffic-manager/traffic-manager-overview https://docs.microsoft.com/ja-jp/azure/application-gateway/application-gateway-faq https://docs.microsoft.com/ja-jp/azure/site-recovery/azure-to-azure-common-questions https://docs.microsoft.com/ja-jp/azure/storage/common/storage-redundancy https://docs.microsoft.com/ja-jp/azure/mysql/concepts-backup
  13. 31 Takeaway • CircleCI + GithubEnterprise + Kaniko + Artifactory

    • GitのTagを中⼼にpipeline作成 極⼒シンプルにしたつもり • kubectlでは-k optionを利⽤して、kustomizeを利⽤。 yml地獄からの脱出 • Canary⽤のmanifestもkustomize配下に配置
  14. 32 Try X – New challenges from now • Database

    – Vitess • Messaging – Nats • Observability – Open Telemetry • Chaos Engineering – Chaos Toolkit
  15. Azure参考情報 #2. AKS best practice • Applying best practices to

    Azure Kubernetes Service (AKS) – https://myignite.techcommunity.microsoft.com/sessions/81598?source=schedule • 可⽤性ゾーン (Availability Zone) とAKS – https://docs.microsoft.com/ja-jp/azure/aks/availability-zones • AKS BCP and DR Best practice – https://docs.microsoft.com/ja-jp/azure/aks/operator-best-practices-multi-region