archive-ca.com » CA » A » ALEXWILLIAMS.CA

Total: 8

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".
  • Alexander Williams
    Alexander Williams There is nothing impossible to him who will try Two years later here s an eBook Presenting the newest eBook Web Scaling vol 1 Small Architectures June 30

    Original URL path: http://alexwilliams.ca/ (2016-04-27)
    Open archived version from archive


  • Alexander Williams
    helps companies put their SaaS apps on premises Being fluent in French and English I occasionally translate technical documents between both languages The past The last 15 years since Jan 2000 have been spent working in the IT industry as an R D systems architecture specialist system network administrator freelance web developer technical and customer support guru I ve been employed consulted and freelanced for small startups with less than 10 employees Nerd Studio Dynamo Intellabase and Openface and larger companies with hundreds of employees Tommy Hilfiger Lasik MD iWeb Technologies GitHub I even wrote an Web Scaling eBook Life As an athlete I m rather versatile in a number of sports My favorites are running 5k to 10k SUP stand up paddle american football snowboarding basketball hockey soccer Like most people I love traveling and was lucky to have spent considerable amount of time all over the USA and Canada east and west coasts Jamaica Spain London UK Japan South Korea Hong Kong Singapore and the Philippines I extensively use multiple library cards and museum memberships so if I m nowhere to be found you should look there first Obsessions I have a tendency to dart into a shop

    Original URL path: http://alexwilliams.ca/about.html (2016-04-27)
    Open archived version from archive

  • Alexander Williams
    Portfolio eBook Archives Each post appears in reverse chronological order newest to oldest Two years later here s an eBook Scripted MySQL Replication Consistency Checks Using HAProxy for MySQL failover

    Original URL path: http://alexwilliams.ca/archives.html (2016-04-27)
    Open archived version from archive



  • Alexander Williams
    best solutions but we have ones that work We want you to be able to implement one of our Small Architectures and solve your problems immediately Once that s done you can go ahead and learn the art to make sure these problems don t re occur In the meantime we hope to guide you in the right direction so that you can move on with your life and get

    Original URL path: http://alexwilliams.ca/post-2011-06-30-two-years-later-heres-an-ebook.html (2016-04-27)
    Open archived version from archive

  • Alexander Williams
    ve written which performs all these verifications I haven t invented anything On the contrary I m just using the methods and tools provided by Percona in their fantastic toolset called Maatkit Usage Change the default User Defined Variables in the script to reflect your MASTER mysql server Configure slave reporting on each slave so that SHOW SLAVE HOSTS G works from the MASTER Make sure your slaves are running properly Slave IO Running Yes Slave SQL Running Yes Seconds Behind Master 0 Make sure you have Maatkit installed apt get install maatkit Run the script on the MASTER like this mysql consistency sh c I have tested this script on Debian Lenny 5 0 with maatkit version 4334 1 and MySQL 5 0 How does it work When you run the script after performing some necessary sanity checks the MASTER will create a checksum of every database and every table It will store those results in the default database called test in the table called checksum It will then replicate the data to the SLAVES who will create their own checksums on the same databases and tables Afterwards it will tell you which slaves are consistent and which ones are not root db01 opt 353 mysql consistency sh c Checking consistency Replication Slave ID 3 on 172 16 0 63 3306 is consistent Replication Slave ID 4 on 172 16 0 64 3306 is consistent Replication Slave ID 5 on 172 16 0 65 3306 is inconsistent Requires rebuild You might get some error messages too Download the script here mysql consistency sh Please notify me in the comments of any errors or adjustements as I ve only used this in a small test environment Comments 2 Jean Francois October 4 2009 11 58 pm Very nice info If

    Original URL path: http://alexwilliams.ca/post-2009-10-01-scripted-mysql-replication-consistency-checks.html (2016-04-27)
    Open archived version from archive

  • Alexander Williams
    requests to DB01 DB03 and DB04 its slaves DB03 and DB04 can t receive replicated data from DB01 DB02 goes into backup mode which can have different settings to support more concurrency send alerts etc 6 DB01 and DB02 are offline due to a server crash or something similar There is no master database server HAProxy stops sending requests to all DB servers Call your sysadmin because your website is probably down Download WARNING DISCLAIMER This configuration has not been tested in a production environment and should be used at your own risk Here are the scripts and config files or scroll down to view the code xinetd mysqlchk mysqlchk status sh haproxy db cfg The xinetd config file The mysqlchk status script The HAProxy config file WARNING DISCLAIMER This configuration has not been tested in a production environment and should be used at your own risk Comments 14 Simon August 11 2009 9 33 pm Very interesting Using MySQL Proxy you could transparently redirects writes to master and reads to slaves Also it could potentially do some of the availability testing logic for you http forge mysql com wiki MySQL Proxy Alex August 29 2009 12 35 am I ve looked into this solution with MySQL Proxy but it doesn t seem to be built for splitting reads writes There are more details about splitting reads writes with MySQL Proxy here http forge mysql com wiki MySQL Proxy RW Splitting Although I personally think it s something which should be done at the application level Istvan Podor September 6 2009 4 42 am Simon MysqlProxy is in ALPHA state and let me quote mysql com MySQL Proxy is currently an Alpha release and should not be used within production environments So good for testing or proof of concept but I would never risk my production systems But Mysqlproxy will be a huge thing when it will be released finaly Alex This is a great article thanks As I can see you are using multi master set up I think in case of a master failure its a kind of expensive to take offline all its slaves too and maybe this is where MMM or something less friendly or advanced could be better But of course everything is depend on the application you are using Thanks again Alex September 6 2009 12 14 pm Istvan That is correct regarding MySQL Proxy That s exactly why I haven t bothered installing it after reading the docs and realizing its early infancy state I m also very anxious to see its official stable production release down the road The goal with this configuration is to maintain available sites as opposed to being entirely down Even if the websites are accessed in a degraded state i e read only in split brain situation at least the websites are accessible and can still be server dynamic content without the ability to modify It definitely depends on the situation In regards to moving the slave

    Original URL path: http://alexwilliams.ca/post-2009-08-10-using-haproxy-for-mysql-failover-and-redundancy.html (2016-04-27)
    Open archived version from archive


  • exit E CODE usage echo e MySQL Replication Consistency version 0 1 c Alex Williams www alexwilliams ca echo e nOptions echo e t c tCheck for inconsistent slave s echo e exit E INVALID ARGS Perform sanity checks before allowing the script to run sanity checks Verify if commands exist for command in COMMANDS do Set the full path of the command PROG which command if PROG then Error message if the command doesn t exist E MSG missing command command return E INVALID COMMAND else Create a variable i e prog tar substitutes all for i e prog mk audit becomes prog mk audit E MSG Command not found eval prog command PROG return fi done Check for inconsistent slaves check Run the mk table checksum command E MSG Problem running prog mk table checksum at the top of check function prog mk table checksum quiet replicate MYSQL CHECKSUM create replicate table empty replicate table h MYSQL HOST P MYSQL PORT u MYSQL USER p MYSQL PASS return E DB PROBLEM SLAVE LIST prog mysql user MYSQL USER password MYSQL PASS e SHOW SLAVE HOSTS G Create arrays for the slave ids hosts ports To manually create the slave arrays do something like this instead slave ids 3 4 5 slave hosts 172 16 0 63 172 16 0 64 172 16 0 65 slave ports 3306 3306 3306 slave ids echo SLAVE LIST grep Server id prog awk F print 2 slave hosts echo SLAVE LIST grep Host prog awk F print 2 slave ports echo SLAVE LIST grep Port prog awk F print 2 Define the number of slaves by the number of entries in the slave ids array num slaves slave ids index 0 if num slaves eq 0 then echo No Replication Slaves appear

    Original URL path: http://alexwilliams.ca/blog/wp-content/uploads/2009/10/mysql_consistency.sh.txt (2016-04-27)
    Open archived version from archive


  • file instead store results in memory MYSQL HOST 172 16 0 60 MYSQL PORT 3306 MYSQL USERNAME replication user MYSQL PASSWORD replication pass We perform a simple query that should return a few results p ERROR MSG usr bin mysql host MYSQL HOST port MYSQL PORT user MYSQL USERNAME password MYSQL PASSWORD e show databases 2 dev null Check the output If it is not empty then everything is fine

    Original URL path: http://alexwilliams.ca/blog/wp-content/uploads/2009/08/mysqlchk_status.sh.txt (2016-04-27)
    Open archived version from archive