diff --git a/secondary/queryport/client/cbq_client.go b/secondary/queryport/client/cbq_client.go
index 1d4f275..497685c 100644
--- a/secondary/queryport/client/cbq_client.go
+++ b/secondary/queryport/client/cbq_client.go
@@ -83,6 +83,10 @@ func newCbqClient(cluster string) (*cbqClient, error) {
 	return b, nil
 }
 
+func (b *cbqClient) UpdateConfig(config common.Config) {
+	return
+}
+
 func (b *cbqClient) Sync() error {
 	return nil
 }
diff --git a/secondary/queryport/client/client.go b/secondary/queryport/client/client.go
index a861a48..e387a16 100644
--- a/secondary/queryport/client/client.go
+++ b/secondary/queryport/client/client.go
@@ -3,7 +3,6 @@ package client
 import "time"
 import "unsafe"
 import "io"
-import "sync/atomic"
 import "fmt"
 
 import "github.com/couchbase/indexing/secondary/logging"
@@ -54,6 +53,9 @@ const (
 
 // BridgeAccessor for Create,Drop,List,Refresh operations.
 type BridgeAccessor interface {
+	// UpdateConfig
+	UpdateConfig(config common.Config)
+
 	// Synchronously update current server metadata to the client
 	// A Refresh call followed by a Sync() ensures that client is
 	// up to date wrt the server.
@@ -191,10 +193,15 @@ type IndexerService struct {
 // use `adminport` for meta-data operation and `queryport`
 // for index-scan related operations.
 type GsiClient struct {
+	// config, 8-byte aligned
+	retryIntervalScanport platform.AlignedInt64
+	retryScanPort         platform.AlignedInt64
+	evictRetry            platform.AlignedInt64
+	config                unsafe.Pointer
+
 	bridge       BridgeAccessor // manages adminport
 	cluster      string
 	maxvb        int
-	config       common.Config
 	queryClients unsafe.Pointer // map[string(queryport)]*GsiScanClient
 	bucketHash   unsafe.Pointer // map[string]uint64 // bucket -> crc64
 }
@@ -211,11 +218,40 @@ func NewGsiClient(
 	if err != nil {
 		return nil, err
 	}
+
+	retryIntervalScanport := int64(config["retryIntervalScanport"].Int())
+	retryScanPort := int64(config["retryScanPort"].Int())
+	evictRetry := int64(config["settings.poolSize"].Int())
+	platform.StoreInt64(&c.retryIntervalScanport, retryIntervalScanport)
+	platform.StoreInt64(&c.retryScanPort, retryScanPort)
+	platform.StoreInt64(&c.evictRetry, evictRetry)
+
 	c.maxvb = -1
 	c.Refresh()
 	return c, nil
 }
 
+func (c *GsiClient) UpdateConfig(config common.Config) {
+	retryIntervalScanport := int64(config["retryIntervalScanport"].Int())
+	retryScanPort := int64(config["retryScanPort"].Int())
+	evictRetry := int64(config["settings.poolSize"].Int())
+
+	platform.StoreInt64(&c.retryIntervalScanport, retryIntervalScanport)
+	platform.StoreInt64(&c.retryScanPort, retryScanPort)
+	platform.StoreInt64(&c.evictRetry, evictRetry)
+
+	cnf := config.Clone()
+	platform.StorePointer(&c.config, unsafe.Pointer(&cnf))
+
+	c.bridge.UpdateConfig(config)
+	qcs := *((*map[string]*GsiScanClient)(platform.LoadPointer(&c.queryClients)))
+	for _, qc := range qcs {
+		qc.UpdateConfig(config)
+	}
+	fmsg := "gsiclient settings updated {retryIntervalScanport:%v, retryScanPort:%v, evictRetry:%v}"
+	logging.Debugf(fmsg, c.retryIntervalScanport, c.retryScanPort, c.evictRetry)
+}
+
 func (c *GsiClient) Bridge() BridgeAccessor {
 	return c.bridge
 }
@@ -645,7 +681,7 @@ func (c *GsiClient) Close() {
 		return
 	}
 	c.bridge.Close()
-	qcs := *((*map[string]*GsiScanClient)(atomic.LoadPointer(&c.queryClients)))
+	qcs := *((*map[string]*GsiScanClient)(platform.LoadPointer(&c.queryClients)))
 	for _, qc := range qcs {
 		qc.Close()
 	}
@@ -654,7 +690,7 @@ func (c *GsiClient) Close() {
 func (c *GsiClient) updateScanClients() {
 	newclients, staleclients := map[string]bool{}, map[string]bool{}
 	cache := map[string]bool{}
-	qcs := *((*map[string]*GsiScanClient)(atomic.LoadPointer(&c.queryClients)))
+	qcs := *((*map[string]*GsiScanClient)(platform.LoadPointer(&c.queryClients)))
 	// add new indexer-nodes
 	for _, queryport := range c.bridge.GetScanports() {
 		cache[queryport] = true
@@ -677,10 +713,11 @@ func (c *GsiClient) updateScanClients() {
 			}
 			clients[queryport] = qc
 		}
+		config := *((*common.Config)(platform.LoadPointer(&c.config)))
 		for queryport := range newclients {
-			clients[queryport] = NewGsiScanClient(queryport, c.config)
+			clients[queryport] = NewGsiScanClient(queryport, config)
 		}
-		atomic.StorePointer(&c.queryClients, unsafe.Pointer(&clients))
+		platform.StorePointer(&c.queryClients, unsafe.Pointer(&clients))
 	}
 }
 
@@ -694,12 +731,13 @@ func (c *GsiClient) doScan(
 	var targetDefnID uint64
 	var scan_err error
 
-	wait := c.config["retryIntervalScanport"].Int()
-	retry := c.config["retryScanPort"].Int()
-	evictRetry := c.config["settings.poolSize"].Int()
+	wait := int(platform.LoadInt64(&c.retryIntervalScanport))
+	retry := int(platform.LoadInt64(&c.retryScanPort))
+	evictRetry := int(platform.LoadInt64(&c.evictRetry))
+
 	for i := 0; true; {
 		qcs :=
-			*((*map[string]*GsiScanClient)(atomic.LoadPointer(&c.queryClients)))
+			*((*map[string]*GsiScanClient)(platform.LoadPointer(&c.queryClients)))
 		if queryport, targetDefnID, ok1 = c.bridge.GetScanport(defnID, i); ok1 {
 			var elapsed uint64
 			index := c.bridge.GetIndexDefn(targetDefnID)
@@ -792,10 +830,11 @@ func (c *GsiClient) getBucketHash(bucketn string) (uint64, bool) {
 // create GSI client using cbqBridge and ScanCoordinator
 func makeWithCbq(cluster string, config common.Config) (*GsiClient, error) {
 	var err error
-	c := &GsiClient{
-		cluster: cluster,
-		config:  config,
-	}
+	c := &GsiClient{cluster: cluster}
+
+	cnf := config.Clone()
+	platform.StorePointer(&c.config, unsafe.Pointer(&cnf))
+
 	platform.StorePointer(&c.bucketHash, (unsafe.Pointer)(new(map[string]uint64)))
 	if c.bridge, err = newCbqClient(cluster); err != nil {
 		return nil, err
@@ -804,7 +843,7 @@ func makeWithCbq(cluster string, config common.Config) (*GsiClient, error) {
 	for _, queryport := range c.bridge.GetScanports() {
 		clients[queryport] = NewGsiScanClient(queryport, config)
 	}
-	atomic.StorePointer(&c.queryClients, unsafe.Pointer(&clients))
+	platform.StorePointer(&c.queryClients, unsafe.Pointer(&clients))
 	return c, nil
 }
 
@@ -813,9 +852,12 @@ func makeWithMetaProvider(
 
 	c = &GsiClient{
 		cluster:      cluster,
-		config:       config,
 		queryClients: unsafe.Pointer(new(map[string]*GsiScanClient)),
 	}
+
+	cnf := config.Clone()
+	platform.StorePointer(&c.config, unsafe.Pointer(&cnf))
+
 	platform.StorePointer(&c.bucketHash, (unsafe.Pointer)(new(map[string]uint64)))
 	c.bridge, err = newMetaBridgeClient(cluster, config)
 	if err != nil {
diff --git a/secondary/queryport/client/conn_pool.go b/secondary/queryport/client/conn_pool.go
index 174d7f2..f919763 100644
--- a/secondary/queryport/client/conn_pool.go
+++ b/secondary/queryport/client/conn_pool.go
@@ -6,6 +6,7 @@ import "net"
 import "time"
 
 import "github.com/couchbase/indexing/secondary/logging"
+import "github.com/couchbase/indexing/secondary/platform"
 import "github.com/couchbase/indexing/secondary/transport"
 import protobuf "github.com/couchbase/indexing/secondary/protobuf/query"
 
@@ -19,15 +20,16 @@ var ErrorNoPool = errors.New("queryport.errorNoPool")
 var ErrorPoolTimeout = errors.New("queryport.connPoolTimeout")
 
 type connectionPool struct {
+	// config params
+	maxPayload   platform.AlignedInt64
+	timeout      platform.AlignedInt64
+	availTimeout platform.AlignedInt64
+
 	host        string
 	mkConn      func(host string) (*connection, error)
 	connections chan *connection
 	createsem   chan bool
-	// config params
-	maxPayload   int
-	timeout      time.Duration
-	availTimeout time.Duration
-	logPrefix    string
+	logPrefix   string
 }
 
 type connection struct {
@@ -37,16 +39,16 @@ type connection struct {
 
 func newConnectionPool(
 	host string,
-	poolSize, poolOverflow, maxPayload int,
-	timeout, availTimeout time.Duration) *connectionPool {
+	poolSize, poolOverflow, maxPayload,
+	timeout, availTimeout int64) *connectionPool {
 
 	cp := &connectionPool{
 		host:         host,
 		connections:  make(chan *connection, poolSize),
 		createsem:    make(chan bool, poolSize+poolOverflow),
-		maxPayload:   maxPayload,
-		timeout:      timeout,
-		availTimeout: availTimeout,
+		maxPayload:   platform.NewAlignedInt64(maxPayload),
+		timeout:      platform.NewAlignedInt64(timeout),
+		availTimeout: platform.NewAlignedInt64(availTimeout),
 		logPrefix:    fmt.Sprintf("[Queryport-connpool:%v]", host),
 	}
 	cp.mkConn = cp.defaultMkConn
@@ -54,6 +56,17 @@ func newConnectionPool(
 	return cp
 }
 
+func (cp *connectionPool) UpdateConfig(
+	maxPayload, timeout, availTimeout int64) {
+
+	platform.StoreInt64(&cp.maxPayload, maxPayload)
+	platform.StoreInt64(&cp.timeout, timeout)
+	platform.StoreInt64(&cp.availTimeout, availTimeout)
+
+	fmsg := "conn-pool settings updated {maxPayload:%v, timeout:%v availtm:%v}"
+	logging.Debugf(fmsg, cp.maxPayload, cp.timeout, cp.availTimeout)
+}
+
 // ConnPoolTimeout is notified whenever connections are acquired from a pool.
 var ConnPoolCallback func(host string, source string, start time.Time, err error)
 
@@ -64,7 +77,8 @@ func (cp *connectionPool) defaultMkConn(host string) (*connection, error) {
 		return nil, err
 	}
 	flags := transport.TransportFlag(0).SetProtobuf()
-	pkt := transport.NewTransportPacket(cp.maxPayload, flags)
+	maxPayload := platform.LoadInt64(&cp.maxPayload)
+	pkt := transport.NewTransportPacket(int(maxPayload), flags)
 	pkt.SetEncoder(transport.EncodingProtobuf, protobuf.ProtobufEncode)
 	pkt.SetDecoder(transport.EncodingProtobuf, protobuf.ProtobufDecode)
 	return &connection{conn, pkt}, nil
@@ -111,7 +125,8 @@ func (cp *connectionPool) GetWithTimeout(d time.Duration) (connectn *connection,
 	default:
 	}
 
-	t := time.NewTimer(cp.availTimeout * time.Millisecond)
+	availTimeout := platform.LoadInt64(&cp.availTimeout)
+	t := time.NewTimer(time.Duration(availTimeout) * time.Millisecond)
 	defer t.Stop()
 
 	// Try to grab an available connection within 1ms
@@ -157,7 +172,8 @@ func (cp *connectionPool) GetWithTimeout(d time.Duration) (connectn *connection,
 }
 
 func (cp *connectionPool) Get() (*connection, error) {
-	return cp.GetWithTimeout(cp.timeout * time.Millisecond)
+	timeout := platform.LoadInt64(&cp.timeout)
+	return cp.GetWithTimeout(time.Duration(timeout) * time.Millisecond)
 }
 
 func (cp *connectionPool) Return(connectn *connection, healthy bool) {
diff --git a/secondary/queryport/client/meta_client.go b/secondary/queryport/client/meta_client.go
index 5ebbbee..089aedf 100644
--- a/secondary/queryport/client/meta_client.go
+++ b/secondary/queryport/client/meta_client.go
@@ -5,26 +5,28 @@ import "fmt"
 import "sort"
 import "errors"
 import "strings"
+import "math"
 import "math/rand"
 import "time"
 import "unsafe"
-import "sync/atomic"
 import "encoding/json"
 
 import "github.com/couchbase/indexing/secondary/logging"
+import "github.com/couchbase/indexing/secondary/platform"
 import common "github.com/couchbase/indexing/secondary/common"
 import mclient "github.com/couchbase/indexing/secondary/manager/client"
 
 type metadataClient struct {
+	// config, 8-byte aligned
+	servicesNotifierRetryTm platform.AlignedInt64
+	logtick                 platform.AlignedInt64
+	randomWeight            platform.AlignedUint64 // float64 between [0, 1.0)
+	equivalenceFactor       platform.AlignedUint64 // float64 between [0, 1.0)
+
 	cluster  string
 	finch    chan bool
 	mdClient *mclient.MetadataProvider
 	indexers unsafe.Pointer // *indexTopology
-	// config
-	servicesNotifierRetryTm int
-	logtick                 time.Duration
-	randomWeight            float64 // value between [0, 1.0)
-	equivalenceFactor       float64 // value between [0, 1.0)
 }
 
 // sherlock topology management, multi-node & single-partition.
@@ -43,10 +45,10 @@ func newMetaBridgeClient(
 		cluster: cluster,
 		finch:   make(chan bool),
 	}
-	b.servicesNotifierRetryTm = config["servicesNotifierRetryTm"].Int()
-	b.logtick = time.Duration(config["logtick"].Int()) * time.Millisecond
-	b.randomWeight = config["load.randomWeight"].Float64()
-	b.equivalenceFactor = config["load.equivalenceFactor"].Float64()
+	b.servicesNotifierRetryTm = platform.NewAlignedInt64(int64(config["servicesNotifierRetryTm"].Int()))
+	b.logtick = platform.NewAlignedInt64(int64(config["logtick"].Int()))
+	b.setrandomWeight(config["load.randomWeight"].Float64())
+	b.setequivalenceFactor(config["load.equivalenceFactor"].Float64())
 	// initialize meta-data-provide.
 	uuid, err := common.NewUUID()
 	if err != nil {
@@ -69,6 +71,16 @@ func newMetaBridgeClient(
 	return b, nil
 }
 
+// Sync will update configuration.
+func (b *metadataClient) UpdateConfig(config common.Config) {
+	// logtick and servicesNotifierRetryTm won't be udpated live.
+	b.setrandomWeight(config["load.randomWeight"].Float64())
+	b.setequivalenceFactor(config["load.equivalenceFactor"].Float64())
+
+	fmsg := "meta_data settings updated {randomWeight:%v, equivalenceFactor:%v}"
+	logging.Debugf(fmsg, b.getrandomWeight(), b.getequivalenceFactor())
+}
+
 // Sync will update the indexer list.
 func (b *metadataClient) Sync() error {
 	if err := b.updateIndexerList(true); err != nil {
@@ -82,7 +94,7 @@ func (b *metadataClient) Sync() error {
 func (b *metadataClient) Refresh() ([]*mclient.IndexMetadata, error) {
 	mindexes := b.mdClient.ListIndex()
 	if b.hasIndexesChanged(mindexes) {
-		currmeta := (*indexTopology)(atomic.LoadPointer(&b.indexers))
+		currmeta := (*indexTopology)(platform.LoadPointer(&b.indexers))
 		b.updateTopology(currmeta.adminports, false /*force*/)
 	}
 	return mindexes, nil
@@ -91,7 +103,7 @@ func (b *metadataClient) Refresh() ([]*mclient.IndexMetadata, error) {
 // Nodes implement BridgeAccessor{} interface.
 func (b *metadataClient) Nodes() ([]*IndexerService, error) {
 	// gather Indexer services
-	currmeta := (*indexTopology)(atomic.LoadPointer(&b.indexers))
+	currmeta := (*indexTopology)(platform.LoadPointer(&b.indexers))
 	nodes := make(map[string]*IndexerService)
 	for indexerID := range currmeta.topology {
 		if indexerID != common.INDEXER_ID_NIL {
@@ -118,7 +130,7 @@ func (b *metadataClient) Nodes() ([]*IndexerService, error) {
 
 // GetIndexDefn implements BridgeAccessor{} interface.
 func (b *metadataClient) GetIndexDefn(defnID uint64) *common.IndexDefn {
-	currmeta := (*indexTopology)(atomic.LoadPointer(&b.indexers))
+	currmeta := (*indexTopology)(platform.LoadPointer(&b.indexers))
 	for _, indexes := range currmeta.topology {
 		for _, index := range indexes {
 			if defnID == uint64(index.Definition.DefnId) {
@@ -179,7 +191,7 @@ func (b *metadataClient) BuildIndexes(defnIDs []uint64) error {
 func (b *metadataClient) DropIndex(defnID uint64) error {
 	err := b.mdClient.DropIndex(common.IndexDefnId(defnID))
 	if err == nil { // cleanup index local cache.
-		currmeta := (*indexTopology)(atomic.LoadPointer(&b.indexers))
+		currmeta := (*indexTopology)(platform.LoadPointer(&b.indexers))
 		b.updateTopology(currmeta.adminports, true /*force*/)
 	}
 	return err
@@ -187,7 +199,7 @@ func (b *metadataClient) DropIndex(defnID uint64) error {
 
 // GetScanports implements BridgeAccessor{} interface.
 func (b *metadataClient) GetScanports() (queryports []string) {
-	currmeta := (*indexTopology)(atomic.LoadPointer(&b.indexers))
+	currmeta := (*indexTopology)(platform.LoadPointer(&b.indexers))
 	queryports = make([]string, 0)
 	for indexerID := range currmeta.topology {
 		if indexerID != common.INDEXER_ID_NIL {
@@ -205,8 +217,8 @@ func (b *metadataClient) GetScanports() (queryports []string) {
 func (b *metadataClient) GetScanport(
 	defnID uint64, retry int) (qp string, targetDefnID uint64, ok bool) {
 
-	currmeta := (*indexTopology)(atomic.LoadPointer(&b.indexers))
-	if rand.Float64() < b.randomWeight {
+	currmeta := (*indexTopology)(platform.LoadPointer(&b.indexers))
+	if rand.Float64() < b.getrandomWeight() {
 		var replicas [128]uint64
 		n := 0
 		for _, replicaID := range currmeta.replicas[common.IndexDefnId(defnID)] {
@@ -229,7 +241,7 @@ func (b *metadataClient) GetScanport(
 
 // Timeit implement BridgeAccessor{} interface.
 func (b *metadataClient) Timeit(defnID uint64, value float64) {
-	currmeta := (*indexTopology)(atomic.LoadPointer(&b.indexers))
+	currmeta := (*indexTopology)(platform.LoadPointer(&b.indexers))
 
 	currmeta.rw.Lock()
 	defer currmeta.rw.Unlock()
@@ -247,7 +259,7 @@ func (b *metadataClient) Timeit(defnID uint64, value float64) {
 // IsPrimary implement BridgeAccessor{} interface.
 func (b *metadataClient) IsPrimary(defnID uint64) bool {
 	b.Refresh()
-	currmeta := (*indexTopology)(atomic.LoadPointer(&b.indexers))
+	currmeta := (*indexTopology)(platform.LoadPointer(&b.indexers))
 	for _, indexes := range currmeta.topology {
 		for _, index := range indexes {
 			if index.Definition.DefnId == common.IndexDefnId(defnID) {
@@ -359,7 +371,7 @@ func (b *metadataClient) pickOptimal(defnID uint64) uint64 {
 	var actvReplicas [128]uint64
 	var loadList [128]float64
 	n := 0
-	currmeta := (*indexTopology)(atomic.LoadPointer(&b.indexers))
+	currmeta := (*indexTopology)(platform.LoadPointer(&b.indexers))
 	for _, replicaID := range currmeta.replicas[common.IndexDefnId(defnID)] {
 		state, _ := b.indexState(uint64(replicaID))
 		if state == common.INDEX_STATE_ACTIVE {
@@ -389,7 +401,7 @@ func (b *metadataClient) pickOptimal(defnID uint64) uint64 {
 		currmeta.rw.RLock()
 		load, ok := currmeta.loads[common.IndexDefnId(replicaID)]
 		currmeta.rw.RUnlock()
-		if !ok || (load.avgLoad*b.equivalenceFactor <= leastLoad) {
+		if !ok || (load.avgLoad*b.getequivalenceFactor() <= leastLoad) {
 			replicas[m] = replicaID
 			m++
 		}
@@ -402,7 +414,8 @@ func (b *metadataClient) pickOptimal(defnID uint64) uint64 {
 //----------------
 
 func (b *metadataClient) logstats() {
-	tick := time.NewTicker(b.logtick)
+	logtick := time.Duration(platform.LoadInt64(&b.logtick))
+	tick := time.NewTicker(logtick * time.Millisecond)
 	defer func() {
 		tick.Stop()
 	}()
@@ -411,7 +424,7 @@ loop:
 	for {
 		<-tick.C
 		s := make([]string, 0, 16)
-		currmeta := (*indexTopology)(atomic.LoadPointer(&b.indexers))
+		currmeta := (*indexTopology)(platform.LoadPointer(&b.indexers))
 		func() {
 			logging.Infof("connected with %v indexers\n", len(currmeta.topology))
 			for id, replicas := range currmeta.replicas {
@@ -436,7 +449,7 @@ loop:
 
 // unprotected access to shared structures.
 func (b *metadataClient) indexState(defnID uint64) (common.IndexState, error) {
-	currmeta := (*indexTopology)(atomic.LoadPointer(&b.indexers))
+	currmeta := (*indexTopology)(platform.LoadPointer(&b.indexers))
 	for _, indexes := range currmeta.topology {
 		for _, index := range indexes {
 			if index.Definition.DefnId == common.IndexDefnId(defnID) {
@@ -505,7 +518,7 @@ func (b *metadataClient) updateIndexerList(discardExisting bool) error {
 	logging.Infof("Refreshed Indexer List: %v", adminports)
 
 	var curradmns map[string]common.IndexerId
-	currmeta := (*indexTopology)(atomic.LoadPointer(&b.indexers))
+	currmeta := (*indexTopology)(platform.LoadPointer(&b.indexers))
 	if currmeta != nil {
 		curradmns = make(map[string]common.IndexerId)
 		for adminport, indexerId := range currmeta.adminports {
@@ -577,7 +590,7 @@ func (b *metadataClient) updateIndexer(
 			"Acknowledged that new indexer is registered.  Indexer = %v, id = %v",
 			adminport, newIndexerId)
 		adminports := make(map[string]common.IndexerId)
-		currmeta := (*indexTopology)(atomic.LoadPointer(&b.indexers))
+		currmeta := (*indexTopology)(platform.LoadPointer(&b.indexers))
 		for admnport, indexerId := range currmeta.adminports {
 			adminports[admnport] = indexerId
 		}
@@ -601,7 +614,7 @@ func (b *metadataClient) updateIndexer(
 func (b *metadataClient) updateTopology(
 	adminports map[string]common.IndexerId, force bool) {
 
-	currmeta := (*indexTopology)(atomic.LoadPointer(&b.indexers))
+	currmeta := (*indexTopology)(platform.LoadPointer(&b.indexers))
 
 	mindexes := b.mdClient.ListIndex()
 	// detect change in indexer cluster or indexes.
@@ -649,13 +662,13 @@ func (b *metadataClient) updateTopology(
 			}
 		}
 	}()
-	atomic.StorePointer(&b.indexers, unsafe.Pointer(newmeta))
+	platform.StorePointer(&b.indexers, unsafe.Pointer(newmeta))
 }
 
 func (b *metadataClient) hasIndexersChanged(
 	adminports map[string]common.IndexerId) bool {
 
-	currmeta := (*indexTopology)(atomic.LoadPointer(&b.indexers))
+	currmeta := (*indexTopology)(platform.LoadPointer(&b.indexers))
 
 	for adminport, indexerId := range adminports {
 		x, ok := currmeta.adminports[adminport]
@@ -675,7 +688,7 @@ func (b *metadataClient) hasIndexersChanged(
 func (b *metadataClient) hasIndexesChanged(
 	mindexes []*mclient.IndexMetadata) bool {
 
-	currmeta := (*indexTopology)(atomic.LoadPointer(&b.indexers))
+	currmeta := (*indexTopology)(platform.LoadPointer(&b.indexers))
 
 	for _, mindex := range mindexes {
 		_, ok := currmeta.replicas[mindex.Definition.DefnId]
@@ -705,6 +718,24 @@ func (b *metadataClient) hasIndexesChanged(
 	return false
 }
 
+func (b *metadataClient) getrandomWeight() float64 {
+	return math.Float64frombits(platform.LoadUint64(&b.randomWeight))
+}
+
+func (b *metadataClient) setrandomWeight(f float64) {
+	bits := math.Float64bits(f)
+	platform.StoreUint64(&b.randomWeight, bits)
+}
+
+func (b *metadataClient) getequivalenceFactor() float64 {
+	return math.Float64frombits(platform.LoadUint64(&b.equivalenceFactor))
+}
+
+func (b *metadataClient) setequivalenceFactor(f float64) {
+	bits := math.Float64bits(f)
+	platform.StoreUint64(&b.equivalenceFactor, bits)
+}
+
 // return adminports for all known indexers.
 func getIndexerAdminports(cinfo *common.ClusterInfoCache) ([]string, error) {
 	iAdminports := make([]string, 0)
@@ -749,8 +780,9 @@ func getIndexerAdminports(cinfo *common.ClusterInfoCache) ([]string, error) {
 //       to bucket scan.
 
 func (b *metadataClient) watchClusterChanges() {
+	servicesNotifierRetryTm := platform.LoadInt64(&b.servicesNotifierRetryTm)
 	selfRestart := func() {
-		time.Sleep(time.Duration(b.servicesNotifierRetryTm) * time.Millisecond)
+		time.Sleep(time.Duration(servicesNotifierRetryTm) * time.Millisecond)
 		go b.watchClusterChanges()
 	}
 
diff --git a/secondary/queryport/client/meta_client_test.go b/secondary/queryport/client/meta_client_test.go
new file mode 100644
index 0000000..95e5a30
--- /dev/null
+++ b/secondary/queryport/client/meta_client_test.go
@@ -0,0 +1,15 @@
+package client
+
+import "testing"
+import "fmt"
+
+var _ = fmt.Sprintf("dummy")
+
+func BenchmarkGetRandomWeight(b *testing.B) {
+	mtc := &metadataClient{}
+	mtc.setrandomWeight(123456.123456789)
+
+	for i := 0; i < b.N; i++ {
+		mtc.getrandomWeight()
+	}
+}
diff --git a/secondary/queryport/client/scan_client.go b/secondary/queryport/client/scan_client.go
index c171009..d87aac6 100644
--- a/secondary/queryport/client/scan_client.go
+++ b/secondary/queryport/client/scan_client.go
@@ -18,6 +18,7 @@ import "time"
 import "encoding/json"
 
 import "github.com/couchbase/indexing/secondary/logging"
+import "github.com/couchbase/indexing/secondary/platform"
 import "github.com/couchbase/indexing/secondary/common"
 import protobuf "github.com/couchbase/indexing/secondary/protobuf/query"
 import "github.com/couchbase/indexing/secondary/transport"
@@ -25,39 +26,61 @@ import "github.com/golang/protobuf/proto"
 
 // GsiScanClient for scan operations.
 type GsiScanClient struct {
+	// config params, 8-byte aligned
+	maxPayload         platform.AlignedInt64
+	readDeadline       platform.AlignedInt64
+	writeDeadline      platform.AlignedInt64
+	poolSize           platform.AlignedInt64
+	poolOverflow       platform.AlignedInt64
+	cpTimeout          platform.AlignedInt64
+	cpAvailWaitTimeout platform.AlignedInt64
+
 	queryport string
 	pool      *connectionPool
-	// config params
-	maxPayload         int // TODO: what if it exceeds ?
-	readDeadline       time.Duration
-	writeDeadline      time.Duration
-	poolSize           int
-	poolOverflow       int
-	cpTimeout          time.Duration
-	cpAvailWaitTimeout time.Duration
-	logPrefix          string
+	logPrefix string
 }
 
 func NewGsiScanClient(queryport string, config common.Config) *GsiScanClient {
-	t := time.Duration(config["connPoolAvailWaitTimeout"].Int())
+	maxPayload := int64(config["maxPayload"].Int())
+	poolSize := int64(config["settings.poolSize"].Int())
+	poolOverflow := int64(config["settings.poolOverflow"].Int())
+	cpTimeout := int64(config["connPoolTimeout"].Int())
+	cpAvailWaitTimeout := int64(config["connPoolAvailWaitTimeout"].Int())
 	c := &GsiScanClient{
 		queryport:          queryport,
-		maxPayload:         config["maxPayload"].Int(),
-		readDeadline:       time.Duration(config["readDeadline"].Int()),
-		writeDeadline:      time.Duration(config["writeDeadline"].Int()),
-		poolSize:           config["settings.poolSize"].Int(),
-		poolOverflow:       config["settings.poolOverflow"].Int(),
-		cpTimeout:          time.Duration(config["connPoolTimeout"].Int()),
-		cpAvailWaitTimeout: t,
+		maxPayload:         platform.NewAlignedInt64(maxPayload),
+		readDeadline:       platform.NewAlignedInt64(int64(config["readDeadline"].Int())),
+		writeDeadline:      platform.NewAlignedInt64(int64(config["writeDeadline"].Int())),
+		poolSize:           platform.NewAlignedInt64(poolSize),
+		poolOverflow:       platform.NewAlignedInt64(poolOverflow),
+		cpTimeout:          platform.NewAlignedInt64(cpTimeout),
+		cpAvailWaitTimeout: platform.NewAlignedInt64(cpAvailWaitTimeout),
 		logPrefix:          fmt.Sprintf("[GsiScanClient:%q]", queryport),
 	}
 	c.pool = newConnectionPool(
-		queryport, c.poolSize, c.poolOverflow, c.maxPayload, c.cpTimeout,
-		c.cpAvailWaitTimeout)
+		queryport, poolSize, poolOverflow, maxPayload,
+		cpTimeout, cpAvailWaitTimeout)
 	logging.Infof("%v started ...\n", c.logPrefix)
 	return c
 }
 
+func (c *GsiScanClient) UpdateConfig(config common.Config) {
+	platform.StoreInt64(&c.readDeadline, int64(config["readDeadline"].Int()))
+	platform.StoreInt64(&c.writeDeadline, int64(config["writeDeadline"].Int()))
+
+	maxPayload := int64(config["maxPayload"].Int())
+	cpTimeout := int64(config["connPoolTimeout"].Int())
+	cpAvailWaitTimeout := int64(config["connPoolAvailWaitTimeout"].Int())
+	platform.StoreInt64(&c.maxPayload, maxPayload)
+	platform.StoreInt64(&c.cpTimeout, cpTimeout)
+	platform.StoreInt64(&c.cpAvailWaitTimeout, cpAvailWaitTimeout)
+
+	c.pool.UpdateConfig(maxPayload, cpTimeout, cpAvailWaitTimeout)
+
+	fmsg := "scan-port settings updated {readDeadline:%v, writeDeadline:%v}"
+	logging.Debugf(fmsg, c.readDeadline, c.writeDeadline)
+}
+
 // LookupStatistics for a single secondary-key.
 func (c *GsiScanClient) LookupStatistics(
 	defnID uint64,
@@ -524,7 +547,8 @@ func (c *GsiScanClient) doRequestResponse(
 	}
 
 	laddr := conn.LocalAddr()
-	c.trySetDeadline(conn, c.readDeadline)
+	readDeadline := time.Duration(platform.LoadInt64(&c.readDeadline))
+	c.trySetDeadline(conn, readDeadline)
 	// <--- protobuf.*Response
 	begin := time.Now()
 	resp, err := pkt.Receive(conn)
@@ -536,7 +560,7 @@ func (c *GsiScanClient) doRequestResponse(
 	}
 	elapsed := time.Since(begin)
 
-	c.trySetDeadline(conn, c.readDeadline)
+	c.trySetDeadline(conn, readDeadline)
 	// <--- protobuf.StreamEndResponse (skipped) TODO: knock this off.
 	if endResp, err := pkt.Receive(conn); err != nil {
 		fmsg := "%v req(%v) connection %v response %T transport failed `%v`\n"
@@ -553,7 +577,8 @@ func (c *GsiScanClient) doRequestResponse(
 func (c *GsiScanClient) sendRequest(
 	conn net.Conn, pkt *transport.TransportPacket, req interface{}) (err error) {
 
-	c.trySetDeadline(conn, c.writeDeadline)
+	writeDeadline := time.Duration(platform.LoadInt64(&c.writeDeadline))
+	c.trySetDeadline(conn, writeDeadline)
 	return pkt.Send(conn, req)
 }
 
@@ -567,7 +592,8 @@ func (c *GsiScanClient) streamResponse(
 	var finish bool
 
 	laddr := conn.LocalAddr()
-	c.trySetDeadline(conn, c.readDeadline)
+	readDeadline := time.Duration(platform.LoadInt64(&c.readDeadline))
+	c.trySetDeadline(conn, readDeadline)
 	begin := time.Now()
 	if resp, err = pkt.Receive(conn); err != nil {
 		//resp := &protobuf.ResponseStream{
@@ -628,8 +654,9 @@ func (c *GsiScanClient) closeStream(
 	logging.Tracef(fmsg, c.logPrefix, requestId, laddr)
 
 	// flush the connection until stream has ended.
+	readDeadline := time.Duration(platform.LoadInt64(&c.readDeadline))
 	for true {
-		c.trySetDeadline(conn, c.readDeadline)
+		c.trySetDeadline(conn, readDeadline)
 		resp, err = pkt.Receive(conn)
 		if err != nil {
 			healthy = false
