Skip to content

Latest commit

 

History

History
82 lines (66 loc) · 3.99 KB

Microservices.md

File metadata and controls

82 lines (66 loc) · 3.99 KB

Microservices

Infrastructure / Platform

  1. Microservices: Java, .NET, Python
  2. Infrastructure: Vagrant: Create and configure lightweight, reproducible, and portable development environments.
  3. Logging & Log collection: ElasticSearch: A Distributed RESTful Search Engine, Logstash, Kibana
  4. Service Discovery: Consul
  5. Monitoring & Metrics: Prometheus
  6. Deployment: Docker, Mesos, and Marathon
  7. PubSub/Messanging: Redis: In-memory data structure store, used as database, cache and message broker.
  • Vagrant script here

Mesos

  • Resource management
  • Abstracts away individual machines
  • Launches tasks: Long running, one off, schedule
  • Maintain state about available resources (CPU/Memory) on each slave machine
  • Master/slave architecture
    • 3 Masters (connected by Zookeper for synchronizing statutes): 1 active & 2 standby
    • 1 Master have 3 Slaves
  • Frameworks: Scheduler & Executor

Marathon

  • Execute for long running tasks i.e.,Docker
  • Private PaaS, HTTP API
  • Marathon task:
    • ID
    • Docker image,
    • Version,
    • Health,
    • Ports,
    • Command/Args
  • Constraints (rules to offers from mesos): UNIQUE, CLUSTER, LIKE, UNLIKE, GROUP_BY
  • Upgrade API: PUT request with new Docker tag using Blue-Green Deployintel

Data Architecture

  1. Command Query Responsibility Segregation
  2. Conflict-free Replicated DataType
  1. Database per service
  2. Eventual Consistency & BASE model
  3. NoSQL comparison

Service Discovery tools:

  • Distributed key value store that provides a reliable way to store data across a cluster of machines.
  • Automatically registers and deregisters services for any Docker container by inspecting containers as they come online
  • Features:

    • Service Discovery: Allow to discover api endpoint, services (databases etc) from DNS / HTTP client.

    • Health Checking

    • Key/Value Store: Hierarchical key/value store for any number of purposes

      • Dynamic configuration
      • Feature flagging
      • Coordination
      • Leader election
    • Multi Datacenter: Consul supports multiple datacenters out of the box. This means users of Consul do not have to worry about building additional layers of abstraction to grow to multiple regions.

  • Installation here

  • Download here