Rajesh KumarFlipkart is good.. Also, I have come across an another interesting real-time ecommerce site - MyDeals247.com - http://www.youtube.com/watch?v=9olj1uJ_k7I1 year ago
Are you sure you want to
Rajesh KumarHave you ever tried www.MyDeals247.com? Its a real-time and the most innovative ecommerce website. you can buy and sell any items best price ever.... do not chase sellers... let sellers chase you and offer the best price....
you may check this out... http://www.youtube.com/watch?v=9olj1uJ_k7I1 year ago
Are you sure you want to
Kumari SankariYou may try this wonderful and life changing book - www.onebookforlifesuccess.com - endorsed by Bill Gates Sr and Abdul Kalam sir.1 year ago
HTTP Load Balancing: Session Affinity• (+) Sessions can be stored on the web server• (+) Different code on different web servers • Useful for testing new code on a subset of users• (-) If any web server goes down, need to migrate sessions• (-) Not easy to take a web server out-of-rotation
HTTP Load Balancer:Session Non-affinity
HTTP Load Balancer: Session Non-affinity• Sessions stored in a common session-store• (+) Easy to manage -- all web servers have identical state• (+) If a web server goes down -- no problem• (+) Can take any web server out-of-rotation• (-) Can’t deploy to a subset of servers for testing• (-) Central session-store could be slower
HTTP Load Balancer:Session Some-affinity
HTTP Load Balancer: Session Some-affinity• Sessions sticky to a subset (group) of machines• Use a common session-store
How Flipkart Scales• Horizontal Scaling • Load-balancing• High Availability setup• Web-server optimizations• Caching
Load Balancer: Hardware?
Load Balancer: Hardware?• Expensive• Inflexible to manage• They run Linux anyway!
How Flipkart Scales• Horizontal Scaling • Load-balancing• High Availability setup• Web-server optimizations• Caching
On the Web Servers
On the Web Servers• PHP5
On the Web Servers• PHP5• Apache/mod_php
On the Web Servers• PHP5• Apache/mod_php
On the Web Servers• PHP5• Apache/mod_php• Apache/mod_fcgid (FastCGI)
On the Web Servers• PHP5• Apache/mod_php• Apache/mod_fcgid (FastCGI)
On the Web Servers• PHP5• Apache/mod_php• Apache/mod_fcgid (FastCGI)• PHP-FPM
On the Web Servers• PHP5• Apache/mod_php• Apache/mod_fcgid (FastCGI)• PHP-FPM • PHP FastCGI Process Manager • Great process management • Security • Configurability & control • Adaptive process spawning (5.3.3RC1+)
On the Web Server: fk-w3-agent
On the Web Server: fk-w3-agent• Simple Java “middleware” daemon
On the Web Server: fk-w3-agent• Simple Java “middleware” daemon• Deployed on each web server
On the Web Server: fk-w3-agent• Simple Java “middleware” daemon• Deployed on each web server• Communicates with PHP through local socket
On the Web Server: fk-w3-agent• Simple Java “middleware” daemon• Deployed on each web server• Communicates with PHP through local socket• Hosts pluggable “handlers”
On the Web Server: fk-w3-agent• Simple Java “middleware” daemon• Deployed on each web server• Communicates with PHP through local socket• Hosts pluggable “handlers”
fk-w3-agent: Why?
fk-w3-agent: Why?• “I wish PHP could ...”
fk-w3-agent: Why?• “I wish PHP could ...”• Logging
fk-w3-agent: Why?• “I wish PHP could ...”• Logging• Connection pools
fk-w3-agent: Logging• We like to log, a lot• Logs need to be flushed to disk
fk-w3-agent: Logging• We like to log, a lot• Logs need to be flushed to disk• PHP resources wasted • waiting for disk I/O • waiting for lock on log files • or logs go missing
fk-w3-agent: Logging
fk-w3-agent: Logging• PHP processes send logs to fk-w3-agent• fk-w3-agent writes logs to files
fk-w3-agent:Connection Pooling
fk-w3-agent: Connection Pooling• Many service calls / request
fk-w3-agent: Connection Pooling• Many service calls / request• Cost of recreating connections high
fk-w3-agent: Connection Pooling• Many service calls / request• Cost of recreating connections high• PHP does not support connection pools*
fk-w3-agent:Connection Pooling
fk-w3-agent: Connection Pooling• fk-w3-agent maintains persistent connection pools to various services• PHP accesses services by communicating with fk- w3-agent
fk-w3-agent:Parallelization
fk-w3-agent: Parallelization• Service calls can be parallelized
fk-w3-agent: Parallelization• Service calls can be parallelized• Multi-threading in PHP is ...
fk-w3-agent:Parallelization
fk-w3-agent: Parallelization• PHP sends request to fk-w3-agent• fk-w3-agent uses multiple threads to hit services in parallel
fk-w3-agent:Config & Discovery
fk-w3-agent: Config & Discovery• Change config without deployment?
fk-w3-agent: Config & Discovery• Change config without deployment?• Simple: store config in a database
fk-w3-agent: Config & Discovery• Change config without deployment?• Simple: store config in a database• But: reloading config on each request: expensive
fk-w3-agent:Config & Discovery
fk-w3-agent: Config & Discovery• fk-w3-agent loads config from database • Caches it in memory • Keeps it up-to-date• PHP gets config from fk-w3-agent
fk-w3-agent:Running Statistics
fk-w3-agent: Running Statistics• PHP sends basic stats to fk-w3-agent for every request• fk-w3-agent aggregates these stats• Used for monitoring
How Flipkart Scales• Horizontal Scaling • Load-balancing• Web-server optimizations• Caching
To Cache or not to Cache?
To Cache or not to Cache?• “There are only two hard things in Computer Science: cache invalidation and naming things”. -- Tim Bray quoting Phil Karlton
To Cache or not to Cache?• “There are only two hard things in Computer Science: cache invalidation and naming things”. -- Tim Bray quoting Phil Karlton• “There are only two hard problems in Computer Science: cache invalidation, naming things and off-by-1 errors.”
you may check this out...
http://www.youtube.com/watch?v=9olj1uJ_k7I 1 year ago