summaryrefslogtreecommitdiff
path: root/day1
diff options
context:
space:
mode:
authorPhil Burton <phil@d3r.com>2019-02-22 15:32:18 +0000
committerPhil Burton <phil@d3r.com>2019-02-22 15:32:18 +0000
commit4e8368f4d847e5c1352302fc53658dfab2c72a9b (patch)
treefe66e708ef51272bea4a0a9de2b4b0f78b711d64 /day1
parent5bace29545690e364f9748b8232b93f7933abb88 (diff)
second and third talk
Diffstat (limited to 'day1')
-rw-r--r--day1/first-talk.txt97
-rw-r--r--day1/no-sql.txt52
2 files changed, 147 insertions, 2 deletions
diff --git a/day1/first-talk.txt b/day1/first-talk.txt
index ffd2f65..da8689e 100644
--- a/day1/first-talk.txt
+++ b/day1/first-talk.txt
@@ -1,8 +1,101 @@
-micro services - perf
+# micro services - perf
-glu mobile - 1st speakers company (microservices)
+## Overivew
+
+glu mobile - microservices
+
+- Use docker
+- HTTP processing
+- Amazon ECS
+- NOSQL Redis + couch base
+- 40M votes a day
+- 1M active users
+- 14K req/m
+
+## Microservices
+
+- Small
+- Simole
+- easy to deploy
+- upgradable
+
+Use Base images
+Name by version and never change (Freeze them)
+
+## background processing
+- Execute externally
+- Shutdown functions
+- Job server
+- fastcgi_finish_request
+
+## HTTP Compression
+
+- gzip on
+- gzip_types
+- gzip_proxied any
+- gzip_comp_level 5
+- gzip_min_length (default 20)
+- Smaller than 1500B means it will always fit in one TCP packet
+
+If content_length is not set then nginx will compress always
+
+Laravel/Lume/Others add middleware to add content_length
+
+## Caching
+- HTTP2 Server push
+- Repeated server calls HTTP1
+- 304s
+ - Last-modified
+ - cache-control
+
+## No SQL
+- Mongo/Redis
+- Fight network I/O
+- save hdd space
+- compress large messages
+- serialise better
+- message templates
+- add ttl expiry
+- shorten cache keys
+
+## Fast caching
+- PHP Redis
+- Predis - high memory, slower
+- Persistent connections available
+
+## Deployment EC8
+- 0 Downtime
+- quick rollout
+- ELB health-check
+- Auto scaling
+
+## Hardware upgrades
+- Doubling the hardware, halving the # of machines
+
+## VPC
+- Closer together
+- Same location
+- utilise internal networks
+- other thoughts
+ - Async I/O
+ - swoole
+ - HTTP/2
+ - Tars
+ - binary (80% reduction)
+
+## Managing images
+- Don't use aptitude (apt)
+- Build from source
+- fpm and Nginx together
+ - Separate not helpful
+ - No need for TCP/IP overhead
+- supervisorD - everywhere
+
+# Useful terms
+aerospike
couch base
php_swoole
+supervisorD
new relic
bugsnag
amazon cloud watch
diff --git a/day1/no-sql.txt b/day1/no-sql.txt
index 5ce9723..ccb6a4a 100644
--- a/day1/no-sql.txt
+++ b/day1/no-sql.txt
@@ -1,3 +1,55 @@
+# Non-Scalar Data
+
+## Redis sets SSAD
+
+- key binding - safe string
+- sets of data
+- taggable
+
+## Document data stores
+- Usually JSON
+- Richer
+- MongoDB - single master
+- CouchDB - multi master
+- ES - text search index
+
+## MongoDB
+- pecl/mongodb
+- mongodb/mongodb
+
+docs are PHP objects or assoc arrays
+
+## Relational Database
+- normalisation
+
+- postgres
+ - HSTORE
+ - JSON/JSONB
+
+
+# Querying data
+
+Sets - SISMEMBER and SMEMBER
+- Aggregations
+- buckets
+- postgres - non standard
+
+## Redis
+- Can add to sets
+- Atomic
+- fast
+- counters
+
+DONT: RETRIVE MANIPULATE STORE
+
+ Do we do this at d3R?
+
+ redis bad at scaling
+
+ joned.in/25887
+
+
+# Useful links
https://redis.io/commands/sadd
https://www.postgresql.org/docs/9.1/hstore.html
https://wiki.openstreetmap.org/wiki/PostgreSQL