diff --git a/secondary/queryport/n1ql/secondary_index.go b/secondary/queryport/n1ql/secondary_index.go
index 33488f7..9cf2d6e 100644
--- a/secondary/queryport/n1ql/secondary_index.go
+++ b/secondary/queryport/n1ql/secondary_index.go
@@ -20,8 +20,9 @@ import "strings"
 import "encoding/gob"
 import "strconv"
 import "io/ioutil"
-import "sync/atomic"
 
+import "github.com/couchbase/cbauth/metakv"
+import "github.com/couchbase/indexing/secondary/platform"
 import l "github.com/couchbase/indexing/secondary/logging"
 import c "github.com/couchbase/indexing/secondary/common"
 import "github.com/couchbase/indexing/secondary/collatejson"
@@ -36,6 +37,7 @@ import "github.com/couchbase/query/value"
 import qlog "github.com/couchbase/query/logging"
 
 const DONEREQUEST = 1
+const MAX_METAKV_RETRIES = 100
 
 // ErrorIndexEmpty is index not initialized.
 var ErrorIndexEmpty = errors.NewError(
@@ -73,21 +75,23 @@ var n1ql2GsiConsistency = map[datastore.ScanConsistency]c.Consistency{
 
 // contains all index loaded via gsi cluster.
 type gsiKeyspace struct {
-	// for 8-byte alignment fot atomic access.
-	scandur        int64
-	blockeddur     int64
-	throttledur    int64
-	primedur       int64
-	totalscans     int64
-	backfillSize   int64
-	totalbackfills int64
+	// for 8-byte alignment for atomic access.
+	scandur        platform.AlignedInt64
+	blockeddur     platform.AlignedInt64
+	throttledur    platform.AlignedInt64
+	primedur       platform.AlignedInt64
+	totalscans     platform.AlignedInt64
+	backfillSize   platform.AlignedInt64
+	totalbackfills platform.AlignedInt64
+
+	// config, 8-byte aligned
+	backfillLimit platform.AlignedInt64
 
 	rw             sync.RWMutex
 	clusterURL     string
 	namespace      string // aka pool
 	keyspace       string // aka bucket
 	gsiClient      *qclient.GsiClient
-	config         c.Config
 	indexes        map[uint64]*secondaryIndex // defnID -> index
 	primaryIndexes map[uint64]*secondaryIndex
 	logPrefix      string
@@ -124,7 +128,8 @@ func NewGSIIndexer(
 		l.Errorf("%v GSI instantiation failed: %v", gsi.logPrefix, err)
 		return nil, errors.NewError(err, "GSI client instantiation failed")
 	}
-	gsi.gsiClient, gsi.config = client, qconf
+	gsi.gsiClient = client
+	gsi.backfillLimit = platform.NewAlignedInt64(int64(qconf["backfillLimit"].Int()))
 	// refresh indexes for this service->namespace->keyspace
 	if err := gsi.Refresh(); err != nil {
 		l.Errorf("%v Refresh() failed: %v", gsi.logPrefix, err)
@@ -132,6 +137,23 @@ func NewGSIIndexer(
 	}
 	l.Infof("%v started ...", gsi.logPrefix)
 
+	// subscribe to metakv
+	cancelCh := make(chan struct{}) // TODO: wire up with Close() method.
+	go func() {
+		fn := func(r int, err error) error {
+			if r > 0 {
+				l.Errorf("metakv notifier failed (%v)..Restarting %v", err, r)
+			}
+			return metakv.RunObserveChildren("/", gsi.settingscb, cancelCh)
+		}
+		rh := c.NewRetryHelper(MAX_METAKV_RETRIES, time.Second, 2, fn)
+		err := rh.Run()
+		if err != nil {
+			l.Errorf("metakv notifier failed even after max retries ...")
+			l.Errorf("bounce application after a configuration update !!")
+		}
+	}()
+
 	logtick := time.Duration(qconf["logtick"].Int()) * time.Millisecond
 	go gsi.logstats(logtick)
 	go gsi.backfillMonitor(5 * time.Second)
@@ -651,8 +673,8 @@ func (si *secondaryIndex) Scan(
 	conn *datastore.IndexConnection) {
 
 	entryChannel := conn.EntryChannel()
+	var backfillSync platform.AlignedInt64
 	var tmpfile *os.File
-	var backfillSync int64
 
 	syncCh := make(chan bool)
 
@@ -668,24 +690,23 @@ func (si *secondaryIndex) Scan(
 				fmsg := "%v remove backfill file %v unexpected failure: %v\n"
 				l.Errorf(fmsg, si.gsi.logPrefix, name, err)
 			}
-			atomic.AddInt64(&si.gsi.totalbackfills, 1)
+			platform.AddInt64(&si.gsi.totalbackfills, 1)
 		}
 	}()
 	defer func() {
-		atomic.StoreInt64(&backfillSync, DONEREQUEST)
+		platform.StoreInt64(&backfillSync, DONEREQUEST)
 	}()
 
 	starttm := time.Now()
 
-	client, cnf := si.gsi.gsiClient, si.gsi.config
+	client := si.gsi.gsiClient
 	if span.Seek != nil {
 		seek := values2SKey(span.Seek)
 		client.Lookup(
 			si.defnID, requestId, []c.SecondaryKey{seek}, distinct, limit,
 			n1ql2GsiConsistency[cons], vector2ts(vector),
 			makeResponsehandler(
-				requestId,
-				si, client, conn, &tmpfile, &backfillSync, syncCh, cnf))
+				requestId, si, client, conn, &tmpfile, &backfillSync, syncCh))
 
 	} else {
 		low, high := values2SKey(span.Range.Low), values2SKey(span.Range.High)
@@ -694,11 +715,10 @@ func (si *secondaryIndex) Scan(
 			si.defnID, requestId, low, high, incl, distinct, limit,
 			n1ql2GsiConsistency[cons], vector2ts(vector),
 			makeResponsehandler(
-				requestId,
-				si, client, conn, &tmpfile, &backfillSync, syncCh, cnf))
+				requestId, si, client, conn, &tmpfile, &backfillSync, syncCh))
 	}
-	atomic.AddInt64(&si.gsi.totalscans, 1)
-	atomic.AddInt64(&si.gsi.scandur, int64(time.Since(starttm)))
+	platform.AddInt64(&si.gsi.totalscans, 1)
+	platform.AddInt64(&si.gsi.scandur, int64(time.Since(starttm)))
 }
 
 // Scan implement PrimaryIndex{} interface.
@@ -706,9 +726,9 @@ func (si *secondaryIndex) ScanEntries(
 	requestId string, limit int64, cons datastore.ScanConsistency,
 	vector timestamp.Vector, conn *datastore.IndexConnection) {
 
+	var backfillSync platform.AlignedInt64
 	entryChannel := conn.EntryChannel()
 	var tmpfile *os.File
-	var backfillSync int64
 
 	syncCh := make(chan bool)
 
@@ -724,25 +744,24 @@ func (si *secondaryIndex) ScanEntries(
 				fmsg := "%v remove backfill file %v unexpected failure: %v\n"
 				l.Errorf(fmsg, si.gsi.logPrefix, name, err)
 			}
-			atomic.AddInt64(&si.gsi.totalbackfills, 1)
+			platform.AddInt64(&si.gsi.totalbackfills, 1)
 		}
 	}()
 	defer func() {
-		atomic.StoreInt64(&backfillSync, DONEREQUEST)
+		platform.StoreInt64(&backfillSync, DONEREQUEST)
 	}()
 
 	starttm := time.Now()
 
-	client, cnf := si.gsi.gsiClient, si.gsi.config
+	client := si.gsi.gsiClient
 	client.ScanAll(
 		si.defnID, requestId, limit,
 		n1ql2GsiConsistency[cons], vector2ts(vector),
 		makeResponsehandler(
-			requestId,
-			si, client, conn, &tmpfile, &backfillSync, syncCh, cnf))
+			requestId, si, client, conn, &tmpfile, &backfillSync, syncCh))
 
-	atomic.AddInt64(&si.gsi.totalscans, 1)
-	atomic.AddInt64(&si.gsi.scandur, int64(time.Since(starttm)))
+	platform.AddInt64(&si.gsi.totalscans, 1)
+	platform.AddInt64(&si.gsi.scandur, int64(time.Since(starttm)))
 }
 
 //-------------------------------------
@@ -754,17 +773,17 @@ func makeResponsehandler(
 	si *secondaryIndex,
 	client *qclient.GsiClient,
 	conn *datastore.IndexConnection,
-	tmpfile **os.File, backfillSync *int64, syncCh chan bool,
-	config c.Config) qclient.ResponseHandler {
+	tmpfile **os.File, backfillSync *platform.AlignedInt64,
+	syncCh chan bool) qclient.ResponseHandler {
 
 	entryChannel := conn.EntryChannel()
 
+	var backfillFin, backfillEntries platform.AlignedInt64
 	var enc *gob.Encoder
 	var dec *gob.Decoder
 	var readfd *os.File
-	var backfillFin, backfillEntries int64
 
-	backfillLimit := int64(config["backfillLimit"].Int())
+	backfillLimit := platform.LoadInt64(&si.gsi.backfillLimit)
 	primed, starttm, ticktm := false, time.Now(), time.Now()
 	lprefix := si.gsi.logPrefix
 
@@ -775,24 +794,25 @@ func makeResponsehandler(
 				readfd.Close()
 			}
 			close(syncCh)
-			atomic.AddInt64(&backfillFin, 1)
+			platform.AddInt64(&backfillFin, 1)
 			l.Debugf(
 				"%v %q finished backfill for %v ...\n",
 				lprefix, requestId, name)
 			recover() // need this because entryChannel() would have closed
 		}()
-		l.Debugf(
-			"%v %q started backfill for %v ...\n", lprefix, requestId, name)
+		fmsg := "%v %q started backfill for %v ...\n"
+		l.Debugf(fmsg, lprefix, requestId, name)
 		for {
-			if pending := atomic.LoadInt64(&backfillEntries); pending > 0 {
-				atomic.AddInt64(&backfillEntries, -1)
-			} else if done := atomic.LoadInt64(backfillSync); done == DONEREQUEST {
+			pending := int64(platform.LoadInt64(&backfillEntries))
+			if pending > 0 {
+				platform.AddInt64(&backfillEntries, -1)
+			} else if done := platform.LoadInt64(backfillSync); done == DONEREQUEST {
 				return
 			} else {
 				time.Sleep(1 * time.Millisecond)
 				continue
 			}
-			cummsize := atomic.LoadInt64(&si.gsi.backfillSize) / (1024 * 1024)
+			cummsize := platform.LoadInt64(&si.gsi.backfillSize) / (1024 * 1024)
 			if cummsize > backfillLimit {
 				fmsg := "%q backfill exceeded limit %v, %v"
 				err := fmt.Errorf(fmsg, requestId, backfillLimit, cummsize)
@@ -816,11 +836,11 @@ func makeResponsehandler(
 			}
 			l.Tracef("%v backfill read %v entries\n", lprefix, len(skeys))
 			if primed == false {
-				atomic.AddInt64(&si.gsi.primedur, int64(time.Since(starttm)))
+				platform.AddInt64(&si.gsi.primedur, int64(time.Since(starttm)))
 				primed = true
 			}
 			if len(entryChannel) > 0 && len(skeys) > 0 {
-				atomic.AddInt64(&si.gsi.throttledur, int64(time.Since(ticktm)))
+				platform.AddInt64(&si.gsi.throttledur, int64(time.Since(ticktm)))
 			}
 			if sendEntries(si, pkeys, skeys, conn) == "stop" {
 				return
@@ -830,12 +850,16 @@ func makeResponsehandler(
 	}
 
 	return func(data qclient.ResponseReader) bool {
-		err := data.Error()
+		var err error
+		var skeys []c.SecondaryKey
+		var pkeys [][]byte
+
+		err = data.Error()
 		if err != nil {
 			conn.Error(n1qlError(client, err))
 			return false
 		}
-		skeys, pkeys, err := data.GetEntries()
+		skeys, pkeys, err = data.GetEntries()
 		if err != nil {
 			conn.Error(n1qlError(client, err))
 			return false
@@ -870,37 +894,37 @@ func makeResponsehandler(
 
 		if *tmpfile != nil {
 			// whether temp-file is exhausted the limit.
-			cummsize := atomic.LoadInt64(&si.gsi.backfillSize) / (1024 * 1024)
+			cummsize := platform.LoadInt64(&si.gsi.backfillSize) / (1024 * 1024)
 			if cummsize > backfillLimit {
 				fmsg := "%q backfill exceeded limit %v, %v"
-				err := fmt.Errorf(fmsg, requestId, backfillLimit, cummsize)
+				err = fmt.Errorf(fmsg, requestId, backfillLimit, cummsize)
 				conn.Error(n1qlError(client, err))
 				return false
 			}
 
 			l.Tracef("%v backfill %v entries\n", lprefix, len(skeys))
-			if atomic.LoadInt64(&backfillFin) > 0 {
+			if platform.LoadInt64(&backfillFin) > 0 {
 				return false
 			}
-			if err := enc.Encode(skeys); err != nil {
+			if err = enc.Encode(skeys); err != nil {
 				conn.Error(n1qlError(client, err))
 				return false
 			}
-			if err := enc.Encode(pkeys); err != nil {
+			if err = enc.Encode(pkeys); err != nil {
 				conn.Error(n1qlError(client, err))
 				return false
 			}
-			atomic.AddInt64(&backfillEntries, 1)
+			platform.AddInt64(&backfillEntries, 1)
 
 		} else {
 			fmsg := "%v response cap:%v len:%v entries:%v\n"
 			l.Tracef(fmsg, lprefix, cp, ln, len(skeys))
 			if primed == false {
-				atomic.AddInt64(&si.gsi.primedur, int64(time.Since(starttm)))
+				platform.AddInt64(&si.gsi.primedur, int64(time.Since(starttm)))
 				primed = true
 			}
 			if len(entryChannel) > 0 && len(skeys) > 0 {
-				atomic.AddInt64(&si.gsi.throttledur, int64(time.Since(ticktm)))
+				platform.AddInt64(&si.gsi.throttledur, int64(time.Since(ticktm)))
 			}
 			if sendEntries(si, pkeys, skeys, conn) == "stop" {
 				return false
@@ -1154,7 +1178,7 @@ func sendEntries(
 			blocked = false
 		}
 	}
-	atomic.AddInt64(&si.gsi.blockeddur, blockedtm)
+	platform.AddInt64(&si.gsi.blockeddur, blockedtm)
 	return "ok"
 }
 
@@ -1167,12 +1191,12 @@ func (gsi *gsiKeyspace) logstats(logtick time.Duration) {
 	sofar := int64(0)
 	for {
 		<-tick.C
-		scandur := atomic.LoadInt64(&gsi.scandur)
-		blockeddur := atomic.LoadInt64(&gsi.blockeddur)
-		throttledur := atomic.LoadInt64(&gsi.throttledur)
-		primedur := atomic.LoadInt64(&gsi.primedur)
-		totalscans := atomic.LoadInt64(&gsi.totalscans)
-		totalbackfills := atomic.LoadInt64(&gsi.totalbackfills)
+		scandur := platform.LoadInt64(&gsi.scandur)
+		blockeddur := platform.LoadInt64(&gsi.blockeddur)
+		throttledur := platform.LoadInt64(&gsi.throttledur)
+		primedur := platform.LoadInt64(&gsi.primedur)
+		totalscans := platform.LoadInt64(&gsi.totalscans)
+		totalbackfills := platform.LoadInt64(&gsi.totalbackfills)
 		if totalscans > sofar {
 			fmsg := `%v logstats %q {` +
 				`"gsi_scan_count":%v,"gsi_scan_duration":%v,` +
@@ -1207,6 +1231,28 @@ func (gsi *gsiKeyspace) backfillMonitor(period time.Duration) {
 				size += int64(file.Size())
 			}
 		}
-		atomic.StoreInt64(&gsi.backfillSize, size)
+		platform.StoreInt64(&gsi.backfillSize, size)
 	}
 }
+
+func (gsi *gsiKeyspace) settingscb(path string, value []byte, rev interface{}) error {
+	if path == c.IndexingSettingsMetaPath {
+		l.Infof("%v settings notifier from metakv %v\n", gsi.logPrefix, string(value))
+		conf, err := c.GetSettingsConfig(c.SystemConfig)
+		if err != nil {
+			l.Errorf("%v GetSettingsConfig(): %v\n", gsi.logPrefix, err)
+			return nil
+		}
+
+		config := conf.Clone()
+		if err := config.Update(value); err != nil {
+			l.Errorf("%v config.Update(): %v\n", gsi.logPrefix, err)
+		}
+
+		qconf := config.SectionConfig("queryport.client.", true /*trim*/)
+
+		backfillLimit := int64(qconf["backfillLimit"].Int())
+		platform.StoreInt64(&gsi.backfillLimit, backfillLimit)
+	}
+	return nil
+}
