Presentation is loading. Please wait.

Presentation is loading. Please wait.

Server Performance, Scaling, Reliability and Configuration Norman White.

Similar presentations


Presentation on theme: "Server Performance, Scaling, Reliability and Configuration Norman White."— Presentation transcript:

1 Server Performance, Scaling, Reliability and Configuration Norman White

2 Scaling UP Run on faster computer Upgrade disk, memory etc. Out Replicate server across multiple machines Distribute “strategic” locations on the internet Host on services like AKAMAI

3 Scaling Up Can keep adding processors, memory etc. Advantages Single environment, easy to administer Disadvantages Processor limitations Network Bandwidth problems Reliability

4 Scaling out Add more computers Distribute workload across multiple systems Have application server(s), video server(s), DB servers etc. But watch out for reliability problems, decreases quickly with more servers Supported by UNIX, LINUX and W2K Cluster machines together so they can automatically take over in case of failure Distribute load across multiple machines. Still may have single failure points Power Network access

5 But there is a little Problem! How do your users get to your machine? Is it over the internet? How much bandwidth can you get to your site? What if you are Victoria Secret and have a huge event once or twice a year?

6 Need to go to edge hosting services Step 1 – Move your web site to your ISP’s location. ISP has backbone access to internet Step 2 – If that is not enough, go to a provider like AKAMAI They distribute your content all over the world at the “edge” points to the internet

7 Demo… Traceroute to several providers Visit Akamai Play akamai flash tutorial

8 Security Issues As we scale up, still only have one machine to guard.. As we scale out, more potential for problems. For internal servers, how do we control access to content?.htaccess Ldap etc. Edge hosting may “contain” problem to certain nodes…

9 .htaccess example Assume a directory structure of restricted content that you want to restrict to “authenticated” users. Have users fill out form with their email address, and desired userid. Email password to them with a link to a cgi script that allows them to change password.

10 .htaccess example AuthUserFile /export/grad/a/aab211/public_html/websys/.htpasswd AuthGroupFile /dev/null AuthName Somewhere.com's Secret Section AuthType Basic require valid-user

11 .htaccess example Assume a directory structure of restricted content that you want to restrict to “authenticated” users. Have users fill out form with their email address, and desired userid. Email password to them with a link to a cgi script that allows them to change password.

12 .htaccess example AuthUserFile /export/grad/a/aab211/public_html/websys/.htpasswd AuthGroupFile /dev/null AuthName Somewhere.com's Secret Section AuthType Basic require valid-user

13 Example.htaccess file describes authentication details and location of htpasswd file.htaccess file placed in the directory it controls, by default controls all lower level directories also. Htpasswd file can be anywhere Htpasswd program used to updated htpasswd file Htpasswd file encrypted

14 Maintaining htpasswd file htpasswd –c passwordfile username Creates a new htpasswd file and adds a username to it, prompting for the password Htpasswd passwordfile username adds a user Htpasswd –b passwordfile username password Creates or updates username password

15 CGI Script to add user Script one htadduser.sh User fills out form with desired username and email address Shell script adduser.sh grep.htpasswd file for username If username exists, issue error Else, generate random password Issue htpasswd –b username passwd Email emailaddress with username and password and link to files. Add username and email address to userid file

16 Changepass.sh Allows user to change password This script should be restricted directory Logic: Display form with userid, desired password Take form input (using POST … Why) Issue htpasswd –b passwordfile username newpassword

17 Conclusion Need to understand management objectives before we can make a decision. Many tradeoffs. Often may do all of the above…

18 Configuring a WEB Server.

19 So what does a web administrator need to know? UNIX - Apache WINDOWS - IIS

20 Apache Apache uses industry standard configuration file Httpd.conf Can set many things like: File Locations Scripting capabilities (PHP, JSP etc.) Performance How many threads etc. Virtual Hosts (more than 1 server on same machine) Same IP ADDRESS, port, different name Same IP, name, different port

21 Windows IIS Configuration done through management control panel Easy to add new features, change configuration etc.

22

23 Conclusion Both Apache and IIS offer easy to use configuration tools. IIS very user friendly, Apache finer control.

24 Other Considerations Disk Management How do we manage disk space in a rapidly changing environment? Problems – Disk sizes limited (9 gig, 18, 36, 72 etc) Extreme read performance requirements Space growing rapidly 24 x 7 – Can’t reconfigure??? HELP!!!

25 Solutions Volume Managers Veritas Volume Manager Separates Physical disk from logical disks Allow administrator to reconfigure on the fly Supports mirroring, striping, raid 5 etc. NAS Network attached storage – just plug device into network, available to many systems (support volume mgt on device) SAN Storage Area Networks Similar to NAS, but allow multiple high speed fiber connections to systems

26 Some Capabilities and Tradeoffs RAID 0 Mirror disks – fast read, fast write, redundant RAID 1 – Striped, spread data across multiple disks Very fast read, slower write, vulnerable to failure

27 More RAID formats RAID 5 Striping with parity Need 3+ drives (max 8) N-1 drives used for data, last drive for parity Actually parity is distributed across all disks If 1 disk dies, data can be reconstructed dynamically by using the remaining disks. System runs in degraded mode until disk is replaced, then automatically rebuilds itself (while still on-line) Reads are very fast (N-1 disks streaming data) Writes are very slow (have to write to N disks, for each write)

28 Even more redundancy Can Mirror RAID 5 arrays, even mirror on a different controller, separate power etc. “SNAPSHOT” backups Volume manager can take a snapshot backup of a “volume” to another volume. Reduces backup time, snapshot is done on live volume, but data is from exactly the same time.

29 Conclusion and Takeaway Infrastructure and hardware designs critical to today’s 24x7 environment. Can be VERY expensive to attain desire (necessary) level of uptime. Need to have lot’s of redundancy and ability to upgrade constantly without taking systems off the air.


Download ppt "Server Performance, Scaling, Reliability and Configuration Norman White."

Similar presentations


Ads by Google