Re: [Spock Proxy Devel] building & running problems
Status: Alpha
Brought to you by:
kaotao
From: Graham F. <gr...@si...> - 2009-11-12 02:07:04
|
For item 3), in a MySQL-MMM environment, I made the following change to SpockProxy and this fixed issues that I was having when switching roles (i.e. Failing over). Index: C:/project/trunk/SimplifyMedia/SpockProxy/src/network-mysqld-proxy.cpp =================================================================== --- C:/project/trunk/SimplifyMedia/SpockProxy/src/network-mysqld-proxy.cpp (revision 21011) +++ C:/project/trunk/SimplifyMedia/SpockProxy/src/network-mysqld-proxy.cpp (revision 21071) @@ -404,6 +404,8 @@ * remove us from the connection pool and close the connection */ network_connection_pool_del_byconn(pool, server); + network_socket_free(server); + network_connection_pool_create_conns(get_network_mysqld()); } } else if (events == EV_TIMEOUT) { if (time(NULL) - server->last_write_time >= get_config_max_conn_idle_time()) { This has only had limited testing, and has not been deployed in a production environment. Graham > -----Original Message----- > From: Frank Flynn [mailto:fr...@co...] > Sent: Wednesday, November 11, 2009 4:53 AM > To: Pavel Gushcha > Cc: spo...@li... > Subject: Re: [Spock Proxy Devel] building & running problems > > > On Nov 10, 2009, at 7:02 AM, Pavel Gushcha wrote: > > > But as i understand, it is not thread-safe (if some spockproxy > > intances work simulateniously with meta database). > > > > Some missing basic feautures/things, about i thinked: > > 1) After looking at logs, i see that spockproxy opens 50 connections > > to meta database, this too many (for shards this is ok) > > 2) I can't specify port for meta database > > You can do this in the config file or on the command line I believe (I > only use the 3306 port so I'm not sure) > > > So, i have following questions: > > 1) Do you plan to release in nearly future next version of > > spockproxy (may be with fixes for compilation process)? > > I don't think we have a new version planned anytime soon. > > > 2) get_next_id() function is not present in sample medatbase dump, > > so is good idea to add it, can you give me code for it? > > It is much like you wrote - but we have added locks to make is thread > safe. But remember that since the proxy will request many next id's > at a time it is unlikely that threads would collide (the proxy will > ensure this because it hands out the id's) > > > 3) Spockproxy support failover for high availability? I plan to have > > 2 servers for each shard with master-master replication. > > You have to make your own failover - but this is also much easier than > you might think. Once configured the Spockproxy only takes a second > to restart even for the biggest, busiest DB's. For HA the same proxy > can be told to connect to a different master but currently you will > have to restart the proxy. > > > 4) Can i contribute code for spockproxy (patches for compilation, > > etc)? > > Yes - because of some changes at Spock we have not been working on our > proxy very much lately. > > Frank > > > ----------------------------------------------------------------------- > ------- > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > trial. Simplify your report design, integration and deployment - and > focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > spockproxy-devel mailing list > spo...@li... > https://lists.sourceforge.net/lists/listinfo/spockproxy-devel |