23
AUGUST 19, 2015 Multi-tenancy AEM Architecture enables FAST IT

EVOLVE'15 | Enhance | Loyola Baskar | Cisco - Multi-tenancy AEM Architecture enables FAST IT

Embed Size (px)

Citation preview

AUGUST 19, 2015

Multi-tenancy AEM Architecture enables FAST IT

2

Akhil Aggrawal

Sr. Director, Architecture, EMCPreviously - Distinguish Engineer & Chief Architect Cisco.com

linkedin.com/in/akhilaggrawal@akhil183

BIO

3

Loyola BaskarArchitect, Cisco

• Believes data structure simplifies architecture

• Loves adding numbers to his Fitbit• Practices ‘zero’ bug coding and ‘blind’

debugging

BIO

Agenda

• Implementing Multi-tenant architecture

• Supporting Fast-IT using Fast deploy architecture

Cisco’s Digital Presence

355Mvisits to

Cisco.com

11.5Msocial reach

3.9Mpaid search click-

throughs

112Morganic search

referrals

40%

34%

71%

4%

10.7Mmobile web

visits

1.4Msocial referrers

to Cisco.com

3Msocial media

mentions5.7M

customer app

downloads

2.5Mvideo views on

Cisco.com

Social Media MobileWeb Video

7.5Mvideo views on Cisco YouTube

47%

[Date Range: Q1FY14 – Q4FY14]

Q1FY14 – Q4FY14

Cisco.com Web Experience Management

• Ave 1200 hits/sec @ Edge• 1.75m visitors• 41% to Cisco Datacenter

• 28m hits @ Adobe AEM• 82m hits @ non-AEM (migration

in fy15)

• Contains ~800K files (.html, .jpg, .gif, .pdf, .mobi and more) [35% of overall cisco.com content]• ~1.5 TB• 80M Nodes

Source: Enterprise Operation Intelligence (Splunk) & Akamai Control Panel & Enterprise Web Analytics

7

Implementing Multi-tenant architecture

subtopic

• Challenges in the past• Multitenant journey• Multitenant architecture• Content organization in AEM• weare.cisco.com use case

Problem statement

• 30+ Web Sites• No Consistent User Experience• No Governance• Inefficient Web Analytics• High Cost Per Site

10

Multitenant journey

Mar 2013

Launched Intranet Site

Corporate Sites

* Marketing* Support* Solutions

weare.cisco.com

AEM 5.5 Provisioned

Microsites Implementation

Global Sites

* UK* Japan* China* ...Feb

2014

salesconnect

Oct 2014

nic.cisco supplychain

lifeconnections

Jul 2015 Nov 2015

FAST Deploy

11

DNS

www.cisco.com Intranet SiteAll

Microsites

AEM App Server Farm

Shared DispatcherCached Folder

micro. dbm

Apache Web Server Farm

W W W

VIP

Microsite

VIPIntranet

VIP

Internal

VIPDomain Name AEM Folder

weare.cisco.com weare

nic.cisco csco/nic

AEM Author

Multitenant architecture

1. DNS/Site Selector2. Corporate website Load Balancer3. Microsites Load Balancer4. Intranet/Employee Website Load Balancer5. Apache web servers with Dispatcher6. Apache DBM file7. AEM 5.5 (Publish)8. AEM 5.5 (Author)

Special Rule to transform request URL to a destination Folder in AEM based on entry point

• SEO Consideration• Separation of sites from one another

• Security Requirements• Internal Vs External content

Domain name to respective Load Balancer IP Mapping

Identical stack in 3 data centersActive-Active-Passive

httxt2dbm

12

/content

en_us

products

support

int

hr

news

micro

salesconnect

weare

index

dam

int

micro

Amazing_People.pdf

weare

Corporate website

Intranet website

All campaign and micro websites

Information Organization in AEm

13

DNS

www.cisco.com Intranet SiteAll

Microsites

AEM App Server Farm

Shared DispatcherCached Folder

micro. dbm

Apache Web Server Farm

W W W

VIP

Microsite

VIPIntranet

VIP

Internal

VIPDomain Name AEM Folder

weare.cisco.com weare

nic.cisco csco/nic

AEM Author

How do we host a site on aem1. Map weare.cisco.com to the microsite IP address

2. Map weare.cisco.com to an AEM Folder

3. Create the AEM Folders• /content/micro/weare• /content/dam/micro/weare

14

DNS

www.cisco.com Intranet SiteAll

Microsites

AEM App Server Farm

Shared DispatcherCached Folder

micro. dbm

Apache Web Server Farm

W W W

VIP

Microsite

VIPIntranet

VIP

Internal

VIPDomain Name AEM Folder

weare.cisco.com weare

nic.cisco csco/nic

AEM Author

Under the hoodhttp://weare.cisco.com/amazingpeople.html

GET /amazingpeople.htmlHOST: weare.cisco.com

Add Load Balancer IdentifierGET /amazingpeople.htmlHOST: weare.cisco.com X-LB-ID: micro-cisco-public

RewriteMap realms "dbm:~/db/mapping.dbm"RewriteCond %{HTTP:X-LB-ID} micro-cisco-publicRewriteRule .? - [E=micro:${realms:%{HTTP_HOST}}0}]

RewriteCond %{ENV:micro} !0ReWriteRule /content/(.*) /content/micro/%{ENV:micro}/$1

/content/micro/weare/amazingpeople.html

GET /content/micro/weare/amazingpeople.htmlHOST: weare.cisco.com X-LB-ID: micro-cisco-public

15

Supporting Fast-IT using Fast deploy architecture

What is fast deploy

• Fast code deployment• < 5 minutes per DC for 30+ bundles (earlier 45 minutes)• Resumes deploy from where last stopped/failed

• True ‘Zero’ Downtime to End User• No disruption to even the requests in progress

• Sanity Test support on the deployment• Sanity users use the same domain as the end users

Fast APP CODE deploy

• Udeploy pulls the required bundles from Artifactory for a given build

• First and last bundle go in sequence• Rest of the bundles go in parallel• Tool retries deploy only bundles that

failed• The deployments progress parallel to all

AEM in a DC

pkgmgr

18

DNS

DC 1

VIPDC 2

VIPDC 1''

VIPDC 2''

VIP

AEM App Server Farm

Apache Web Server Farm

App

VIP

AEM App Server Farm

Apache Web Server Farm

App

VIP

Fast deploy architectureDomain to IP Address Resolution• Round Robin IP Distribution

Primary Load Balancers•Use http probe health check•Synthetic DC failure

Secondary Load Balancers (private)•Used for DC fail over•Use tcp/ip to stay connected during sanity testing

Regular Traffic pattern

Httpprobe

Httpprobe

tcpprobe

tcpprobe

failover

50 50

failover

19

DNS

DC 1

VIPDC 2

VIPDC 1''

VIPDC 2''

VIP

AEM App Server Farm

Apache Web Server Farm

App

VIP

AEM App Server Farm

Apache Web Server Farm

App

VIP

Httpprobe

Httpprobe

tcpprobe

tcpprobe

DC1 Deployment: END user use case1. Probe page deleted manually to force the DC1 failure

2. End User Traffic moved to DC2

3. When all logs stop, DC1 ready for Code deployment

The requests in DC will complete without fail

New requests

20

sanity user notification

21

DNS

DC 1

VIPDC 2

VIPDC 1''

VIPDC 2''

VIP

AEM App Server Farm

Apache Web Server Farm

App

VIP

AEM App Server Farm

Apache Web Server Farm

App

VIP

Httpprobe

Httpprobe

tcpprobe

tcpprobe

DC1 Deployment: sanity user use caseDeployment Complete in DC1 and is ready for sanity testing

Sanity user comes with a special cookie

Apache Special Rewrite Rule Proxy the user to DC1 through DC1”

ReWriteCond %{QUERY_STRING} sanitykey=xxkey [OR]ReWriteCond %{HTTP_COOKIE} sanitykey=xxkeyReWriteRule .? http://dc2shadow.cisco.com%{REQUEST_URI} [L,P]

22

Thank you.

Recap

1. A new campaign/microsite can be launched in few hours2. Costs nothing to host a site3. Efficient deployment model < 5 min per dc4. Zero downtime for end user5. Realistic Sanity testing support

Apache rewrite rules

ReWriteCond %{QUERY_STRING} sanitykey=xxkeyReWriteRule .? - [CO=sanitykey:xxkey:.cisco.com:60:/]

ReWriteCond %{QUERY_STRING} sanitykey=xxkey [OR]ReWriteCond %{HTTP_COOKIE} sanitykey=xxkeyReWriteCond ~/f/fastdeploy.at.dc1 -fReWriteRule .? http://dc2shadow.cisco.com%{REQUEST_URI} [L,P]

RewriteMap realms "dbm:~/db/mapping.dbm"RewriteCond %{HTTP:X-LB-ID} micro-cisco-publicRewriteRule .? - [E=micro:${realms:%{HTTP_HOST}}0}]

RewriteCond %{ENV:micro} !0ReWriteRule /content/(.*) /content/micro/%{ENV:micro}/$1

MULTITENANT REWRITE RULE

FAST DEPLOY REWRITE RULE