Hey! I saw this has been indexed by the search engines. It is a first draft of a post I ended up publishing on my blog at: Scaling PostgreSQL With Pgpool and PgBouncer
Thanks for stopping by!
Hey! I saw this has been indexed by the search engines. It is a first draft of a post I ended up publishing on my blog at: Scaling PostgreSQL With Pgpool and PgBouncer
Thanks for stopping by!
Vertical decomposition. Creating cohesive services
One of the biggest misconceptions about services is that a service is an independent deployable unit, i.e., service equals process. With this view, we are defining services according to how components are physically deployed. In our example, since it’s clear that the backend admin runs in its own process/container, we consider it to be a service.
But this definition of a service is wrong. Rather you need to define your services in terms of business capabilities. The deployment aspect of the system doesn’t have to be correlated to how the system has been divided into logical services. For example, a single service might run in different components/processes, and a single component might contain parts of multiple services. Once you start thinking of services in terms of business capabilities rather than deployment units, a whole world of options open.
What are the Admin UI
- What do Etcd, Consul, and Zookeeper do? | |
- Service Registration: | |
- Host, port number, and sometimes authentication credentials, protocols, versions | |
numbers, and/or environment details. | |
- Service Discovery: | |
- Ability for client application to query the central registry to learn of service location. | |
- Consistent and durable general-purpose K/V store across distributed system. | |
- Some solutions support this better than others. | |
- Based on Paxos or some derivative (i.e. Raft) algorithm to quickly converge to a consistent state. | |
- Centralized locking can be based on this K/V store. |
This is how I configured the deploy of my rails apps to AWS Elastic Beanstalk through CircleCI.
On Project Settings > Environment Variables add this keys:
var drivingSchedule = {}; | |
var turnNumber = 0; | |
var MIN_VISITS_PER_VEHICLE = 1; // to keep everyone busy | |
var OPTIMIZE_EVERY_X_TURNS = 5; | |
var turn = function(vehicles, people, buildings) { | |
'use strict'; | |
if(turnNumber % OPTIMIZE_EVERY_X_TURNS === 0 && turnNumber < 1000) { | |
// Parse data to be suitable for Routific's API |
# coding: utf-8 | |
import json | |
from django import template | |
from django.utils.dateparse import parse_datetime | |
from django.utils.html import mark_safe | |
register = template.Library() |