Scaling our websites
- Projects I've worked on and will be working on
- Scaling technics we have implemented
- Other scaling technics
My Projects
- Need Info Audit
- Reconcile State Certification
- Mass Verify Cumulative Meter Reading
- Transaction Notes
- Mr Muew Infrastructure Upgrade
- MySQL Upgrade
What's next?
- Trade Infrastructure upgrade
Our Architecture

What's Scalability
A system’s ability to cope with increased load.
Two types of scaling
- Vertical Scaling
- Horizontal Scaling
Scaling Technics we’ve used
Technic 1. Making the servers stateless
What is state?
Sessions, local files, ...
What does a stateful server look like?


What we have done?
Scaling Technics we’ve used
Technic 2. Functional Partitioning
What is functional partitioning?
What are the benefits of functional partitioning?
What we have done?
Scaling Technics we’ve used
Technic 3. Load Balancer
What does load balancer do?
What are the benefits of using load balancer?
What we have done?
AWS Elastic Load Balancer

Scaling Technics we’ve used
Technic 4. Caching
What is caching?
Why caching?
- Much faster than querying the DB
- Prevents repetitive calculations
What we have done?
- AWS memcached service
- User permissions, user accounts, ...
Other Scaling Technics
Technic 1. Data Replication
How does it work?

Other Scaling Technics
Technic 1. Data Replication
Benefits
-
Distribute read load
-
High availability
Limitations
-
Can only scale the read load
-
Can’t scale the data size
-
Replication lag
Other Scaling Technics
Technic 2. Data Partitioning
What is data partitioning?

Other Scaling Technics
Technic 2. Data Partitioning
Benefits
- Theoretically data can be scale to any size
- Scale both read and write
Limitaions
- Can't execute DB queries spanning multiple servers
- Rebalancing
Other Scaling Technics
Technic 3. Asynchronous Processing
Synchronous Processing vs Asynchronous Processing


Other Scaling Technics
Technic 3. Asynchronous Processing
Good candidates for asynchronous processing
- Interacting with remote servers
- Resource intensive work
- ...
References
- Web Scalability for Startup Engineers
- Designing Data-Intensive Applications


Thank you!


SRECTrade Presentation 11/1/2019
By David Zheng
SRECTrade Presentation 11/1/2019
- 18