This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--# postgresql 12 high availability cookbook ch14: creating a scalable nextval replacement | |
--## this example has 2048 shards (schemas) and 2048 unique values per millisecond (seq % 2048) | |
--# ref: [Sharding & IDs at Instagram](https://instagram-engineering.com/sharding-ids-at-instagram-1cf5a71e5a5c) | |
CREATE SCHEMA shard; | |
CREATE SEQUENCE shard.table_id_seq; | |
CREATE OR REPLACE FUNCTION shard.next_unique_id( | |
shard_id INT | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# haproxy -v | |
# HA-Proxy version 2.3.14-83c5b44 2021/09/07 - https://haproxy.org/ | |
# Status: stable branch - will stop receiving fixes around Q1 2022. | |
# Known bugs: http://www.haproxy.org/bugs/bugs-2.3.14.html | |
# Self-signed SSL certificate | |
# https://gridscale.io/en/community/tutorials/haproxy-ssl/ | |
# openssl req -nodes -x509 -newkey rsa:2048 -keyout /etc/ssl/private/test.key -out /etc/ssl/private/test.crt -days 3650 | |
# writing new private key to '/etc/ssl/private/test.key' | |
# ----- |
OlderNewer