Upload
frederic-rivain
View
206
Download
3
Embed Size (px)
DESCRIPTION
Support de cours du troisième et dernier module de gestion de projet web, dans le cadre de l'IUT de Bobigny (année scolaire 2012-2013).
Citation preview
INFRASTRUCTURE ET OPÉRATIONS
Gestion de projet web – Module 3
MODULE 3 : INFRASTRUCTURE ET OPÉRATIONS
Infrastructure, Cloud computing (scaling automatique)
Exploitation : monitoring, logs, kpi, instrumentation,
test A/B
Petit rappel : dans un contexte d’entreprise…
Projetez-vous !
Gestio
n d
e p
roje
t Web | IU
T B
obig
ny 2
012
-2013 | F
rédéric
RIV
AIN
-fre
deric
.rivain
@gm
ail.c
om
2
INFRASTRUCTURE
HOSTING
Hosting should be:
Cheap
Scalable
Redundant
99,9% SLA
Secured
Efficient
Allow for fast rollback
Compatible with automated deployment
Self-care
Capacity to deploy internationally
CDN for static data
Separate environments: Preprod, Prod
Optimize more and more to reduce hosting cost.4
Gestio
n d
e p
roje
t Web | IU
T B
obig
ny 2
012
-2013 | F
rédéric
RIV
AIN
-fre
deric
.rivain
@gm
ail.c
om
CLOUD COMPUTING
COMPUTING TIMELINE
6
Gestio
n d
e p
roje
t Web | IU
T B
obig
ny 2
012
-2013 | F
rédéric
RIV
AIN
-fre
deric
.rivain
@gm
ail.c
om
WHAT IS CLOUD COMPUTING?
Cloud computing leverages the capabilities of the Internet to deliver
“everything-as-a-service”.
General term for anything that involves:
delivering hosted services over the Internet
3 characteristics that differentiate it from traditional hosting:
• Sold on demand, typically by the minute or the hour
• It is elastic: a user can have as much or as little of a service as they want at any
given time
• The service is fully managed by the provider (the consumer needs nothing but a
personal computer and Internet access).
7
Gestio
n d
e p
roje
t Web | IU
T B
obig
ny 2
012
-2013 | F
rédéric
RIV
AIN
-fre
deric
.rivain
@gm
ail.c
om
3 LAYERS OF CLOUD COMPUTING
These services are broadly divided into three categories:
1. Infrastructure-as-a-Service (IaaS): example Amazon Web Services
2. Platform-as-a-Service (PaaS): example Google App Engine
3. Software-as-a-Service (SaaS): example web-based email Gmail, Hotmail
8
Gestio
n d
e p
roje
t Web | IU
T B
obig
ny 2
012
-2013 | F
rédéric
RIV
AIN
-fre
deric
.rivain
@gm
ail.c
om
CLOUD LAYERS
9
Gestio
n d
e p
roje
t Web | IU
T B
obig
ny 2
012
-2013 | F
rédéric
RIV
AIN
-fre
deric
.rivain
@gm
ail.c
om
IAAS
IaaS transforms the traditional datacenter model to that of a utility.
Virtualization permits pooling of cloud resources.
Example: Amazon Web services
(AWS)
Rackspace Cloud
NTT
Orange Cloud Pro
10
Gestio
n d
e p
roje
t Web | IU
T B
obig
ny 2
012
-2013 | F
rédéric
RIV
AIN
-fre
deric
.rivain
@gm
ail.c
om
PAAS
PaaS shortens the application development lifecycle thus reduces the time to market.
PaaS allows the user to focus on application development without the burden of managing the underlying development platform, hardware and resources. 11
Gestio
n d
e p
roje
t Web | IU
T B
obig
ny 2
012
-2013 | F
rédéric
RIV
AIN
-fre
deric
.rivain
@gm
ail.c
om
SAAS
SaaS is an evolution from the traditional application service provider (ASP) model: Customers can share
application instances, thus increasing application utilization and driving economies of scale.
SaaS is optimized for use over a network and as such, applications become available on-demand.
As a result, the traditional licensing approach of software is transformed to a subscription. 12
Gestio
n d
e p
roje
t Web | IU
T B
obig
ny 2
012
-2013 | F
rédéric
RIV
AIN
-fre
deric
.rivain
@gm
ail.c
om
PUBLIC CLOUD VS PRIVATE CLOUD
The public cloud infrastructure is made available to the general public in the form of a subscription through the Internet.
In a private cloud formation, the cloud infrastructure is operated solely for an organization.
Hybrid cloud formation consists of two or more heterogeneous cloud formations.
13
Gestio
n d
e p
roje
t Web | IU
T B
obig
ny 2
012
-2013 | F
rédéric
RIV
AIN
-fre
deric
.rivain
@gm
ail.c
om
ADVANTAGES OF CLOUD COMPUTING
API to interact with the Cloud
Reduced cost based on usage
Ubiquitous network access: available through any Internet-enabled devices
Sharing of resources and costs across a large pool of users allows for: Centralization of infrastructure in locations with lower costs (such
as real estate, electricity, etc.)
Peak-load capacity increases (users need not engineer for highest possible load-levels)
Utilization and efficiency improvements for systems that are often only 10–20% utilized
Reliability with multiple redundant sites
Scalability: consumers can increase or decrease capacity at will
Maintenance: done by the provider
Metering and monitoring14
Gestio
n d
e p
roje
t Web | IU
T B
obig
ny 2
012
-2013 | F
rédéric
RIV
AIN
-fre
deric
.rivain
@gm
ail.c
om
ISSUES OF PUBLIC CLOUD COMPUTING
Privacy
Security
Availability and performance
Lack of control
15
Gestio
n d
e p
roje
t Web | IU
T B
obig
ny 2
012
-2013 | F
rédéric
RIV
AIN
-fre
deric
.rivain
@gm
ail.c
om
CDN
Content Delivery Network is basically a large network distributed storage hard drive.
It can store any types of static files, deployed over multiple location, so as to optimize bandwidth and download access for any client.
Advantages: Low latency. Improves content load times
High bandwidth. Enables high bit rate HD video and other bandwidth-heavy applications
Redundant. Eliminates single points of failure
Scalable. Ensure great experience as number of end users grows
Global. Worldwide network provides great experience regardless of geography
Cost-effective. Pay as you go model provides flexibility for your business
Drawbacks: Propagation time on all nodes. A CDN is not made to store files that need to
be updated often.16
Gestio
n d
e p
roje
t Web | IU
T B
obig
ny 2
012
-2013 | F
rédéric
RIV
AIN
-fre
deric
.rivain
@gm
ail.c
om
HOW CDN WORKS
Based on object caching:
17
Gestio
n d
e p
roje
t Web | IU
T B
obig
ny 2
012
-2013 | F
rédéric
RIV
AIN
-fre
deric
.rivain
@gm
ail.c
om
CDN
Edge LocationCustom origin
with content
Data transfer of cached content
to end user (if cached)Data transfer of content to CDN
edge location to cache
Cached copies of
objects
If content not cached – object
requested from origin
12
3 4
Request routed to most
optimal edge location
End-user requests content
HOSTING IN THE CLOUD
TYPICAL WEB ARCHITECTURE
Gestio
n d
e p
roje
t Web | IU
T B
obig
ny 2
012
-2013 | F
rédéric
RIV
AIN
-fre
deric
.rivain
@gm
ail.c
om
Beware of Single Point of Failure (SPoF)
Mitigate risks
19
AUTO-SCALING
Auto-scaling = Add or remove servers dynamically
Scale up and down your servers to:
Improve availibility of service
Optimize hosting cost
Choose the proper metrics to define scale rules
Set hard limits: 2 min, N max
Scale up early, scale down slowly 20
Gestio
n d
e p
roje
t Web | IU
T B
obig
ny 2
012
-2013 | F
rédéric
RIV
AIN
-fre
deric
.rivain
@gm
ail.c
om
UNDERSTANDING AUTO-SCALING
21
Gestio
n d
e p
roje
t Web | IU
T B
obig
ny 2
012
-2013 | F
rédéric
RIV
AIN
-fre
deric
.rivain
@gm
ail.c
om
CACHING
4 types of caches:
Web browser cache (client-side)
Network cache
CDN: Amazon CloudFront, Akamai, Azure CDN, …
Reverse proxy: Nginx, Varnish, Apache
Application cache:
Memcached (key-value)
Database cache
22
Gestio
n d
e p
roje
t Web | IU
T B
obig
ny 2
012
-2013 | F
rédéric
RIV
AIN
-fre
deric
.rivain
@gm
ail.c
om
Memcached Reverse Proxy
DNS & SSL
DNS (Domain
Name System)
Champ A :
adresse IP d'un
hôte
Champ MX :
nom de domaine
des serveurs de
mail associés
Champ CNAME :
nom canonique
d'un alias
SSL (Secure
Sockets Layer)23
Gestio
n d
e p
roje
t Web | IU
T B
obig
ny 2
012
-2013 | F
rédéric
RIV
AIN
-fre
deric
.rivain
@gm
ail.c
om
OPERATIONS
MONITORING
Monitoring is mandatory in web operations.
Centralized console
Powerful alert system with email and SMS
On-call organization
Define metrics
25
Gestio
n d
e p
roje
t Web | IU
T B
obig
ny 2
012
-2013 | F
rédéric
RIV
AIN
-fre
deric
.rivain
@gm
ail.c
om
LOGS
Logs are critical for operations: Application logs
Database logs
System logs
Various log levels: Debug: used for problem diagnosis. Not in Production.
Info: help trace execution in a production environment.
Warning: A warning message indicates a potential problem in the system.
Error: serious problem in the system.
Include timestamp, caller identity, source code details, thread id
Log in real-time
Centralize logs
Use Logging libraries (log4j, log4php…) 26
Gestio
n d
e p
roje
t Web | IU
T B
obig
ny 2
012
-2013 | F
rédéric
RIV
AIN
-fre
deric
.rivain
@gm
ail.c
om
DATA-CENTRIC: MEASURE ANYTHING,
MEASURE EVERYTHING
“You can’t manage what you don’t measure.”
W. Edwards Deming, Peter Drucker
Make good use of data. Use science.
Implement an instrumentation framework, to have the ability to track any indicator.
27
Gestio
n d
e p
roje
t Web | IU
T B
obig
ny 2
012
-2013 | F
rédéric
RIV
AIN
-fre
deric
.rivain
@gm
ail.c
om
A/B TESTING
Pour répondre à la simple question : B est-il meilleur que A ?Que va-t-il se passer si je fais B ? Expérimenter différentes variantes sur différentes populations
Mesurer
Décider sur la base de données explicites, statistiquement signifiantes
Systématiser l’expérimentation en test A/B chaque fois qu’on introduit de nouvelles évolutions et comparer avec l’existant
28
Gestio
n d
e p
roje
t Web | IU
T B
obig
ny 2
012
-2013 | F
rédéric
RIV
AIN
-fre
deric
.rivain
@gm
ail.c
om
KPI AND BUSINESS INTELLIGENCE
Define KPI (Key Performance Indicators): Technical
Business
Build simple real-time dashboards to expose KPI
Use datamining solutions to do deeperanalysis
Datamining tools QlikView http://www.qlikview.com/
Jaspersoft http://www.jaspersoft.com/fr
Tableau Software http://www.tableausoftware.com/
And learn about Big Data… 29
Gestio
n d
e p
roje
t Web | IU
T B
obig
ny 2
012
-2013 | F
rédéric
RIV
AIN
-fre
deric
.rivain
@gm
ail.c
om
UN PEU DE PRATIQUE
EXERCISE 1: DNS & SERVER SECURITY
1. Set up a DNS name by using
https://freedns.afraid.org/menu/
2. Check DNS propagation:
http://www.whatsmydns.net
3. Check your site security, for instance with:
http://www.websecurify.com/
31
Gestio
n d
e p
roje
t Web | IU
T B
obig
ny 2
012
-2013 | F
rédéric
RIV
AIN
-fre
deric
.rivain
@gm
ail.c
om
EXERCISE 2 : LOAD TESTING & MONITORING
1. Create a Jmeter script to simulate load on your web
site.
Install from http://jmeter.apache.org/
2. Use a monitoring web site to check availibility of
your site. For instance: http://www.siteuptime.com/
http://www.monitor.us
http://portal.monitis.com/
http://www.catchpoint.com/
32
Gestio
n d
e p
roje
t Web | IU
T B
obig
ny 2
012
-2013 | F
rédéric
RIV
AIN
-fre
deric
.rivain
@gm
ail.c
om
EXERCISE 3: A/B TESTING
Build a variant of your homepage and simulate A/B
testing by using:
http://visualwebsiteoptimizer.com/
33
Gestio
n d
e p
roje
t Web | IU
T B
obig
ny 2
012
-2013 | F
rédéric
RIV
AIN
-fre
deric
.rivain
@gm
ail.c
om
EXERCISE 4 : ARCHITECTURE CLOUD
1. Create a free account on Outscale:
http://www.outscale.com
2. Launch a mini Linux instance
3. Deploy your website into a virtual instance
Try again load-testing with Jmeter and check out
scale-up and down
34
Gestio
n d
e p
roje
t Web | IU
T B
obig
ny 2
012
-2013 | F
rédéric
RIV
AIN
-fre
deric
.rivain
@gm
ail.c
om
RÉFÉRENCES
CLOUD COMPUTING
Aws Blog http://aws.typepad.com/aws/
High Scalability http://highscalability.com/
Netflix blog http://techblog.netflix.com/
Ysance blog http://decrypt.ysance.com/
36
Gestio
n d
e p
roje
t Web | IU
T B
obig
ny 2
012
-2013 | F
rédéric
RIV
AIN
-fre
deric
.rivain
@gm
ail.c
om
INSTRUMENTATION
Make it ridiculously simple for any engineer to get anything they can
count or time into a graph with almost no effort
http://codeascraft.etsy.com/2011/02/15/measure-anything-measure-
everything/
http://codeascraft.etsy.com/2010/12/08/track-every-release/
http://codeascraft.etsy.com/2012/06/21/building-websites-with-
science/
https://github.com/etsy/statsd
Graphite for graphics: http://graphite.wikidot.com/
Big Data et décisionnel:
http://pro.clubic.com/it-business/article-508407-1-big-data-analyse-
donnees-interesse-entreprises.html
Big Data: The Management Revolution : http://hbr.org/2012/10/big-
data-the-management-revolution/ar/1
37
Gestio
n d
e p
roje
t Web | IU
T B
obig
ny 2
012
-2013 | F
rédéric
RIV
AIN
-fre
deric
.rivain
@gm
ail.c
om
MONITORING
http://newrelic.com/
http://www.zenoss.com/
http://sixrevisions.com/tools/10-free-server-network-monitoring-tools-that-kick-ass/
http://decrypt.ysance.com/2011/02/comparatif-outils-monitoring-metrologie-supervision-1-zabbix-
centreon-nagios-cacti-munin/
http://decrypt.ysance.com/2011/02/comparatif-outils-monitoring-metrologie-supervision-2-zabbix-
centreon-nagios-cacti-munin/
http://www.thegeekstuff.com/2009/09/top-5-best-network-monitoring-tools/
Ganglia : http://ganglia.info/
Centralized monitoring: http://www.splunk.com/ http://www.moonlit-software.com
http://www.siteuptime.com/ http://mon.itor.us/index.jsp http://www.scivisum.co.uk/
http://www.catchpoint.com/ http://www.compuware.com/application-performance-management/
http://portal.monitis.com/ http://www.keynote.com/ http://www.yottaa.com/
38
Gestio
n d
e p
roje
t Web | IU
T B
obig
ny 2
012
-2013 | F
rédéric
RIV
AIN
-fre
deric
.rivain
@gm
ail.c
om
TEST A/B
“Not only a marketing tool focused on UI, but most of all a developer tool to be used easily when implementing new features, from front-end to back-end.”
“The goal is to have split-testing be a continuous part of our development process, so much that it is considered a completely routine part of developing a new feature.”
http://www.exp-platform.com/Documents/GuideControlledExperiments.pdf
http://elem.com/~btilly/effective-ab-testing/ / http://elem.com/~btilly/effective-ab-testing/g-test-calculator.html
http://cdn.oreillystatic.com/en/assets/1/event/61/Building%20an%20A_B%20Testing%20Framework%20for%20Web%20Applications%20Presentation.pdf
http://cdn.oreillystatic.com/en/assets/1/event/61/Building%20an%20A_B%20Testing%20Framework%20for%20Web%20Applications%20Presentation%201.pdf
A/B Frameworkhttp://fr.slideshare.net/patio11/ab-testing-framework-design-3296257
https://github.com/etsy/ab
Toolhttp://abtester.com/calculator/
39
Gestio
n d
e p
roje
t Web | IU
T B
obig
ny 2
012
-2013 | F
rédéric
RIV
AIN
-fre
deric
.rivain
@gm
ail.c
om
UN PETIT SITE POUR RETROUVER CE COURS
https://sites.google.com/site/iutbobignyweb/
Support de formation
Liens utiles
Coordonnées
Formulaire d’évaluation
40
Gestio
n d
e p
roje
t Web | IU
T B
obig
ny 2
012
-2013 | F
rédéric
RIV
AIN
-fre
deric
.rivain
@gm
ail.c
om