Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015

50
RESPONSIVE WEB DESIGN AT 299 792 458 m / s a 15 minutes story of an Italian top brand @andreapernici

Transcript of Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015

Page 1: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015

RESPONSIVE WEB DESIGN AT

299 792 458 m / sa 15 minutes story of an Italian top brand

@andreapernici

Page 2: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015
Page 3: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015

THIS IS THE STORY OF A

VERY VERYOLD WEBSITE

Page 4: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015

I’M A DALMATIAN PELICAN LIVING NEAR

THE IRON GATESAND I WILL TAKE CARE OF YOUR HOMEWORK

Page 5: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015
Page 6: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015

OK, BUT…WHY AM I TELLING YOU THIS?

Page 7: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015
Page 8: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015

1. COMPLETE MIGRATION OF THE CMS. Brand new one (url change, structure change, everything change, etc …)

2. REDESIGN WITH MANY CONSTRAINTS.Commercial and directly impacting the customer’s business. Emotional and intimate ones cause part of the customer’s life.

3. REDUCING SERVER (INFRASTRUCTURE)COSTS WHILE IMPROVING PERFOMANCE,CRAWL EFFICIENCY AND RELIABILITY.From a very costly infrastructure to a more simple one working on the full dev-stack.

Page 9: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015

1. COMPLETE MIGRATION OF THE CMS. Brand new one (url change, structure change, everything change, etc …)

2. REDESIGN WITH MANY CONSTRAINTS.Commercial and directly impacting the customer’s business. Emotional and intimate ones cause part of the customer’s life.

3. REDUCING SERVER (INFRASTRUCTURE)COSTS WHILE IMPROVING PERFOMANCE,CRAWL EFFICIENCY AND RELIABILITY.From a very costly infrastructure to a more simple one working on the full dev-stack.

Page 10: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015

FROM A 290€/month

TO A 35€/month

SERVER

Page 11: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015

1. COMPLETE DB REDESIGN

2. VARIOUS LEVELS OF CACHINGsome in memory

3. APACHE (+ NGINX AS A REVERSE PROXY FOR STATIC CONTENT)

Page 12: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015
Page 13: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015
Page 14: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015

BUT THE SERVER WAS

TOO STRESSED

Page 15: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015

…AND AFTER A LOG AUDIT

Page 16: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015

MORE THAN

OF ACCESSES WERE FROM FAKE/MALICIOUS SOURCES

Page 17: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015
Page 18: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015

CSF (ConfigServer Security & Firewall) SETUP TO PREVENT

- PORT SCANNING, - BRUTE FORCE- SIMPLE DDOS ATTEMPS- ETC ETC…

Page 19: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015

MOD_SECURITYTO IDENTIFY BAD BOT ACCESS

Page 20: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015
Page 21: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015

HARD NUMBERSANNOTATE EVERY SINGLE THING YOURDEVS TEAM CHANGE

Page 22: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015

THINGS CAN GO

WRONG

Page 23: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015

WE MUST

WE CAN’T CONTROL EVERYTHING, BUT

ACHIEVE STABILITYPREVENT INSTABILITY

Page 24: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015

WE MUST

WE CAN’T CONTROL EVERYTHING, BUT

ACHIEVE STABILITYPREVENT INSTABILITY

aka you don’t know what you are doing aka you know what you are doing

Page 25: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015

THIS IS TRUE & VALID

FOR ANY WEBSITEIN ANY CONTEXT, BUT

MORE IMPORTANT

THAN EVER IN AMOBILE WORLD

Page 26: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015

LET SEE WHYSource - Google PageSpeed Insight

Page 27: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015

LET SEE WHY

ASSUMING WE ARE IN AN IDEAL CONDITION

Page 28: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015

LET SEE WHY

YOU CANNOT DO ANYTHING ABOUT

Page 29: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015

LET SEE WHY

THE PATH TO STABILITY

Page 30: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015
Page 31: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015
Page 32: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015

ON THE FRONTEND WE CAN MAKE A DIFFERENCE

Page 33: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015

THE CRITICAL

MISSION

Page 34: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015
Page 35: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015
Page 36: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015

YOU TOLD ME

200ms

Page 37: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015
Page 38: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015

WE’RE ONLY LOSING WHERE WECAN’T DO ANYTHING ABOUT

BUT THERE IS STILL ROOM FOR IMPROVEMENT

Page 39: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015

1.36AVERAGE TTI

DESKTOP

2.37AVERAGE TTI

MOBILE

RUMDATA

Page 40: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015

NOT BAD CONSIDERING ALSO THE PERCENTILE

Page 41: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015

NOT BADCONSIDERING

1. THE WEBSITE IS IMAGE HEAVY.

2. CONTENTS MANAGED BYNON-TECHNICAL STAFF.

Page 42: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015

WE’RE SAVING

3.060 €/year

Page 43: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015

SOME TRICK

1. DELIVER CORE CONTENT FIRST

2. PROGRESSIVELY ENHANCE EXTRAS

Page 44: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015

SOME TRICK

3. MAKE SURE FEATURES FAIL GRACEFULLY

4. AVOID SINGLE POINT OF FAILURE

Page 45: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015

SOME TRICK

5. CRITICAL CSS FOR NEW VISITORS

6. CACHED CSS FOR RETURNING VISITORS

Page 46: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015

SOME TRICK

7. SYNTHETIC TESTING AND MONITORING

8. REAL USER MONITORING

Page 47: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015

SOME TRICK

9. USE SERVER SIDE TOOLS FOR ANOMALY DETECTION AND AUTOMATION

Page 48: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015

BUILD A PERFORMANCE

CULTURE IN YOUR

ORGANIZATION

Page 49: Responsive Web Design at the speed of light, by Andrea Pernici/ SEM Days 2015

PERFORMANCE{A LOT LIKE SEO}IS A REQUIREMENT

NOT AN ADD-ON