+ All Categories
Home > Technology > Website building exercise

Website building exercise

Date post: 01-Nov-2014
Category:
Upload: meilai521
View: 230 times
Download: 1 times
Share this document with a friend
Description:
use 5 servers to build a company web site website build exercise
Popular Tags:
19
5 servers to build website A website building exercise chuenlye leo [email protected]
Transcript
Page 1: Website building exercise

5 servers to build website

A website building exercise

chuenlye [email protected]

Page 2: Website building exercise

use 5 servers to build one company website:● automation repetitive admin tasks ● make it fully operational as "production" ● complete for operation side and

documentation as well

assignment

Page 3: Website building exercise

some assumptions on this website:● site purpose: a typical company website

for company introduction, market brochure, information dissemination , etc.

● scale: not very big like popular social community site, but should be flexible to scale up/down.

My works

Page 4: Website building exercise

● read-intensive, not write-intensive● redundancy/availability: it is a must ● scalability: better to let it be high

scalable ● performance: not very strict, but no

single point of contention is good.● automation: it is a must in the cloud

times●

from the technical point of view

Page 5: Website building exercise

● shared nothing architecture● no single point of failure● automate everything

Idea Design

Page 6: Website building exercise

implementation

Page 7: Website building exercise

one LB servertwo application servertwo db server(mysql replication, master/slave)

5 servers at the beginning

Page 8: Website building exercise

one LB server: single point of failure.multiple LB servers + shared IP can fix this problem.

issues

Page 9: Website building exercise

Application servers:

No single point of file system is used?session problem?store sessions in a memcached cluster, but seems not easy?

issues

Page 10: Website building exercise

DB servers:this site is considered as read-intensive,so mysql replication can be considered to be OK. one write db server and multiple read-only db servers to distribute read loads.No need partitioning/sharding and no-sql.

issues

Page 11: Website building exercise

Load Balancer with apachesoft lb alternatives:● HAProxy● Varnish● Squid● nginx● …...

details

Page 12: Website building exercise

website template morph use wordpress,this exercise use drupal.

details

Page 13: Website building exercise

personally, scale vertically(CPU/MEM/IO/NW) is not prefered.scale horizontally for application serversscale horizontally(to some extent) for mysql servers

scale: phased, incremental approach

Page 14: Website building exercise

❖ automation of installation/configuration ❖ auto-scaling:● half-auto by hand with

chef/puppet/ansible, etc● full-auto with auto-scaling system, like

AWS auto-scaling/Scalr/RightScale/DIY

automation

Page 15: Website building exercise

$ knife role listlb-apache # for LB severdeploy-drupal # for app servermysql-master # for mastermysql-slave # for slave

automation details

Page 16: Website building exercise

we can :● compose multiple roles for one servere.g: all-in-one 1 server system for dev/test● create multiple servers with the same

role in production environment for scalability.

automation details

Page 17: Website building exercise

LB server:use chef search to get all balancer members(app servers) automatically.members = search(:node, "role:deploy-drupal*")

<% @members.sort_by{|i| i['ipaddress'] }.each do |member| %> BalancerMember http://<%= member['ipaddress'] %>:80 <% end %>

chef-client can be used as a daemon to update automatically.

automation details

Page 18: Website building exercise

● for people who don't use chef● simple web demo can be extended to

one-click deploy system.

Demo site: http://lb-server/runchef

Run chef from web UI

Page 19: Website building exercise

please see operations guide.

Thanks!

how to use this demo site


Recommended