Couchbase_at_The_Hut_Group_Couchbase_UK_2013

613 views

Published on

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
613
On SlideShare
0
From Embeds
0
Number of Embeds
242
Actions
Shares
0
Downloads
12
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Couchbase_at_The_Hut_Group_Couchbase_UK_2013

  1. 1. THE HUT GROUP + COUCHBASEChris Woods - Architect
  2. 2. THEHUTGROUP+COUCHBASEAboutAbout MeName: Chris WoodsRole: ArchitectContact: chris.woods@thehutgroup.com@chriswoods1983About The Hut GroupThe Hut Group is the UK’s leading multi-website online retailer withoperations in the womens fashion, health & beauty, entertainment and giftsmarket. The group has also firmly established itself in multiple internationalmarkets, with 35% of current sales coming from outside the UK.
  3. 3. THEHUTGROUP+COUCHBASEProblemProblem
  4. 4. THEHUTGROUP+COUCHBASEBackgroundSession State• Server bound: Whenever we deployed our existing application, allthe customers currently on the site get kicked out of the ”checkoutflow”, making it costly to release and consequently restricts whenand how often you can release.• No Resiliency: If the server you are bound to via sticky sessiongoes down customer gets kicked out of checkout.
  5. 5. THEHUTGROUP+COUCHBASEThe SolutionRequirements• Performance: Be capable of supporting 4,000 concurrent sessions per minat a sustained rate during “peak”.• Server Affinity: Should be able to release the system at any time of dayand not affect the user experience.• Scalability: Grows with the company - can be expanded to support 1,000 to10,000 times more traffic.• Resiliency: Can be scaled across multiple data centres in multiple physicallocations.• Resiliency: A failure should not cause downtime.
  6. 6. THEHUTGROUP+COUCHBASEThe Contenders
  7. 7. THEHUTGROUP+COUCHBASEWhy Couchbase• Performance.• Resiliency.• Schemaless.• Simplicity.• Cost.
  8. 8. THEHUTGROUP+COUCHBASEThe Hard Stuff
  9. 9. Aggregate Document{“checkoutOrder”: {"orderNumber": "27162500","customer": {"customerId": 5830953,"email": "chris@chriswoods.me.uk","customerName": "mr c woods",},"basket": {"basketItems": [{"productTitle": "Apple iPad Mini: 64GBWifi - White and Silver","quantity": 1,"itemPrice": {"money": {"amount": 419.99,"currency": "GBP“}},},“shipping”:{etc…},“delivery”:{etc…},etc…}}
  10. 10. THEHUTGROUP+COUCHBASE
  11. 11. THEHUTGROUP+COUCHBASEUpdate Consistency Issues2, On receiving change ofaddress request theapplication:-2a, Request DeliveryOptions2b, Check ShippingRestrictions1, Customerchanges address3, Restrictions returnthen thethread loadsthedocumentmodifies itand saves it4, Deliveryoptionsreturn thenthe threadloads thedocumentmodifies itand saves itCAS:1 CAS:1ONE WILL FAIL !ShipabilityServiceDeliveryService
  12. 12. THEHUTGROUP+COUCHBASESeparate Aggregates{“delivery”:{}} {“shipping”:{}}{“checkoutOrder”: {"orderNumber": "27162500","customer": {"customerId": 5830953,"email": "chris@chriswoods.me.uk","customerName": "mr c woods",},"basket": {"basketItems": [{"productTitle": "Apple iPad Mini:64GB Wifi - White and Silver","quantity": 1,"itemPrice": {"money": {"amount": 419.99,"currency": "GBP“}},},etc…}}
  13. 13. THEHUTGROUP+COUCHBASESchema Migrations in a Schemaless data modelV 2.0Version 2.0 Version 2.0 Version 1.0Version 2.0V 2.0V 1.0V 1.01.2. 3.4.
  14. 14. THEHUTGROUP+COUCHBASESuccess• Released on 2nd July• Passed Christmas with flying colours• Very few CAS errors
  15. 15. THEHUTGROUP+COUCHBASENew Stuff
  16. 16. THEHUTGROUP+COUCHBASECouchbase 2.0 and Elastic Search for product searchExisting infrastructureJar + Cron JobDataSolr MasterSolr SlavesProduct updateSearch
  17. 17. THEHUTGROUP+COUCHBASECouchbase 2.0 and Elastic Search for product searchProduct updateSearch/findBy(Query criteria)XDRC
  18. 18. SummarySummary
  19. 19. THEHUTGROUP+COUCHBASEQuestions?

×