2 分钟

Debug python performance issue with pyflame

pyflame is an opensource tool developed by uber: https://github.com/uber/pyflame It can take snapshots of running python process, combined with flamegraph.pl, can output flamegraph picture of python call stacks. Help analyze bottleneck of python program, needn’t inject any perf code into your …
lang-en python
阅读全文 →
5 分钟

Designing data intensive application, reading notes, Part 2

Chapter 4, 5, 6 Encoding formats xml, json, msgpack are text based encoding format, they can’t carry binary bytes (useless you encode them in base64, size grows 33%). And they cary schema definition with data, wast a lot of space. thrift, protobuf are binary format, can take binary bytes, only carry …
lang-en book
阅读全文 →
3 分钟

4月周末杂记

月初的时候搬了家, 之后的周末一直在忙些琐琐碎碎的事情,嘛,仔细一想,除了去宜家搬了个电视柜回来都不记得干了啥… 这周末心血来潮去听了两个讲座,一个人文的,一个技术的,还都碰到了点有意思的事情。
阅读全文 →
7 分钟

Infrastructure as Code

Create virtual resource on AWS is very convenient, but how to manage them will be a problem when your size grow. You will come to: How to explain the detail online settings for your colleagues (like: how our prod vpc is setup?what’s the DHCP option set?), navigate around AWS console is okay, but not …
lang-en AWS server-infra
阅读全文 →
3 分钟

MySQL partition table

Overview MySQL has buildin partition table support, which can help split data accross multi tables, and provide a unified query interface as normal tables. Benefit: Easy data management: If we need to archive old data, and our table is partitioned by datetime, we can drop old partition directly. …
Database MySQL
阅读全文 →
3 分钟

ElasticSearch cluster

In this article, let’s talk about ElasticSearch’s cluster mode, which means multi nodes ElasticSearch. Basic concepts cluster: A collection of server nodes with same cluster.name settings in elasticsearch.yaml primary shards: Divide a index into multi parts(by default 5), shards of an index can be …
distribute elasticsearch
阅读全文 →
3 分钟

Matrix 14 years later

心血来潮, 又看了遍黑客帝国三部曲, 当年的沃卓斯基兄弟都变成沃卓斯基姐妹了, 唏嘘啊… 第一次看的时候, 好像是初中吧, 记得看第三部还是姑父的盗版碟上看的, 那天还拉了个同学和我一起看,然后请他吃了泡面+冰淇淋,结果他回家就拉肚了,抱怨了我好久,所以印象特别深刻,哈哈.
阅读全文 →