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

Key Problems of Microservice Architecture

Key Problems of Microservice Architecture

Anatoliy Sokolenko

October 18, 2014
Tweet

More Decks by Anatoliy Sokolenko

Other Decks in Technology

Transcript

  1. Service Implementation API Formally contracted Discoverable Composable Stateless Loosely coupled

    Autonomous Micro Configuration Discoverable Autonomous Networking Principals Problems Reusable
  2. Challenge Domain Challenge Service get(challengeUuid): Challenge create(Challenge): UUID search(query): UUID[]

    index(Challenge) Navigation Service get(userUuid): User create(User): UUID User Service
  3. @Value('${navigation.api.limit.default:10}') int defaultLimit; //... if (limit == null) { limit

    = defaultLimit; } final DynamicIntProperty defaultLimit = DynamicPropertyFactory.getInstance() .getIntProperty('navigation.api.limit.default', 10) //... if (limit == null) { limit = defaultLimit.get(); }
  4. volatile int defaultLimit; { final DynamicIntProperty dynamicDefaultLimit = DynamicPropertyFactory.getInstance() .getIntProperty('navigation.api.limit.default',

    10, new Runnable() { @Override void run() { defaultLimit = dynamicDefaultLimit.get(); } }); this.defaultLimit = dynamicDefaultLimit.get(); } //... if (limit == null) { limit = defaultLimit; }
  5. Navigation Service User Service API Remote Service Client Cache Discovery

    Service Client HTTP Client User Service API User Service API User Service API index()
  6. Navigation Service User Service API Remote Service Client Cache Discovery

    Service Client HTTP Client User Service API User Service API User Service API index() retry
  7. Navigation Service User Service API Remote Service Client Cache Discovery

    Service Client HTTP Client User Service API User Service API User Service API index() retry AP
  8. Network is Fast… Read 1 KiB sequentially from memory 250

    ns Read 1 KiB sequentially from SSD 1,000 ns Send 1 KiB over 1 Gbps network 10,000 ns Read 1 KiB sequentially from disk 20,000 ns Read 1 KiB randomly from SSD 1GB/sec 37,500 ns Round trip within same datacenter 500,000 ns Disk seek 10,000,000 ns Send packet CA > Netherlands > CA 150,000,000 ns Average amazon.com page open time 3,260,000,000 ns Services calls involved to build single page amazon.com 100-150
  9. … but not Fast Enough Challenge Service UpdateIndexCommand API Navigation

    Service API create() Notification Service API User Service API NotifyUserCommand get() User GetUserCommand User Cache
  10. … still not Fast Enough Challenge Service API create() Notification

    Service API NotifyUserCommand Notification Service API Notification Service API Load Balancer
  11. … still not Fast Enough Challenge Service API create() Notification

    Service API NotifyUserCommand Notification Service API Notification Service API Service Discovery