Chilango Rails Ecommerce Lightning talk

15
eCommerce platform Edwin Cruz Monday, January 26, 15

Transcript of Chilango Rails Ecommerce Lightning talk

eCommerce platformEdwin Cruz

Monday, January 26, 15

What we wanted

• Super fast and scalable ecommerce platform

• Avoid same mistakes

• Not to fix the same performance issues later or as less as possible

• Performant from the beginning

• Catalog and PDP separated from checkout

Monday, January 26, 15

What we wanted

• Single page application

• API Based backend

• Fulltext search

• Taxons filtering, Facets

• Avoid dealing with CORS

Monday, January 26, 15

What we wanted

• Take advantage as much as possible of CDNs

• Fast and independent deployments

• SEO Friendly

• Multi Store

• Highly Redundant!

Monday, January 26, 15

What we wanted

• Replaceable backend

• Nearly real time inventory levels

• Few caching

• Cheap hosting

Monday, January 26, 15

What we chose

• Spree for backend

• AngularJS for frontend

• Solr for fulltext search and faceting

• PostgreSQL

• Sidekiq with unique jobs

Monday, January 26, 15

What we chose

• Redis for session storage

• Nginx for assets

• HaProxy for balancing(with spdy)

• Memcached for caching

• Single Repo

Monday, January 26, 15

What we chose

• CoreOS

• Fleet, Systemd and Etcd

• Docker Containers

• GoLang (Vulcand)

• Ansible

• Fastly

Monday, January 26, 15

Architecture

• /catalog/products <= GoLang app reads from Solr

• /app <= Spree Engine indexes to Solr

• /admin <= Angular App

• / <= Angular App

Monday, January 26, 15

Architecture

Router

/catalog

/app

/

Solr S

Postgres

Redis

Sidekiq

Solr M

AngularApp

Monday, January 26, 15

DebianVulcan

Core OSDocker

Architecture

router2

catalog1

catalog2

catalogN

Solr S

Solr S

router1

Monday, January 26, 15

DebianVulcan Debian

Architecture

router2

Web1

Web2

App1

App2

router1

AppN

Monday, January 26, 15

Show me the numbers!

With 10k products

Monday, January 26, 15

Some issues

• Browsers cache html pages with our angular app

• SEO

• A lot of PR’s

• Deploy multiple apps from same repo

• Etcd cluster getting out of sync

Monday, January 26, 15

Thanks!

Questions?

Monday, January 26, 15