Repository: uber/cadence
Pull request #4118 (2021-04-07 03:17:49)

Refactor config: move config and dynamiconfig one level up
<!-- Describe what has changed in this PR -->
**What changed?**
Refactor config: move config and dynamiconfig one level up


<!-- Tell your future self why have you made these changes -->
**Why?**
I have been sick with this layout for a very long time. This config and dynamicconfig is one of the most frequent lookup but they are hidden very deep. Moreover, I don't know why they have to be under `service/`. 

So of course services use the configs...but so are all other packages. 

<!-- How have you verified this change? Tested locally? Added a unit test? Checked in staging env? -->
**How did you test it?**
existing test.
Mostly are done by IDE, I only need to fix something that IDE missed. 

<!-- Assuming the worst case, what can be broken when deploying this change to production? -->
**Potential risks**
No. 

<!-- Is it notable for release? e.g. schema updates, configuration or data migration required? If so, please mention it, and also update CHANGELOG.md -->
**Release notes**

<!-- Is there any documentation updates should be made for config, https://cadenceworkflow.io/docs/operation-guide/setup/ ? If so, please open an PR in https://github.com/uber/cadence-docs -->
**Documentation Changes**


yycptt: > Is the path for dynamic config updated in the config file?

nvm, I confused the import path with the actual config file path. Change LGTM!

Patch:
diff --git a/bench/lib/config.go b/bench/lib/config.go
index d93ce9eed..4679d3fb0 100644
--- a/bench/lib/config.go
+++ b/bench/lib/config.go
@@ -23,7 +23,7 @@ package lib
 import (
 	"errors"
 
-	"github.com/uber/cadence/common/service/config"
+	"github.com/uber/cadence/common/config"
 )
 
 const (
diff --git a/canary/config.go b/canary/config.go
index 34aee77fd..37c86b7bd 100644
--- a/canary/config.go
+++ b/canary/config.go
@@ -27,7 +27,7 @@ import (
 	"go.uber.org/cadence/.gen/go/cadence/workflowserviceclient"
 	"go.uber.org/zap"
 
-	"github.com/uber/cadence/common/service/config"
+	"github.com/uber/cadence/common/config"
 )
 
 const (
diff --git a/client/clientfactory.go b/client/clientfactory.go
index e8a41ba69..0cdccf3ae 100644
--- a/client/clientfactory.go
+++ b/client/clientfactory.go
@@ -34,10 +34,10 @@ import (
 	"github.com/uber/cadence/client/history"
 	"github.com/uber/cadence/client/matching"
 	"github.com/uber/cadence/common"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/membership"
 	"github.com/uber/cadence/common/metrics"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 )
 
 const (
diff --git a/client/matching/loadbalancer.go b/client/matching/loadbalancer.go
index 677749ed4..5ba07b409 100644
--- a/client/matching/loadbalancer.go
+++ b/client/matching/loadbalancer.go
@@ -26,7 +26,7 @@ import (
 	"strings"
 
 	"github.com/uber/cadence/common"
-	"github.com/uber/cadence/common/service/dynamicconfig"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/types"
 )
 
diff --git a/cmd/bench/main.go b/cmd/bench/main.go
index 2bf3a3e2e..f6dcbab0c 100644
--- a/cmd/bench/main.go
+++ b/cmd/bench/main.go
@@ -30,7 +30,7 @@ import (
 
 	"github.com/uber/cadence/bench"
 	"github.com/uber/cadence/bench/lib"
-	"github.com/uber/cadence/common/service/config"
+	"github.com/uber/cadence/common/config"
 )
 
 const (
diff --git a/cmd/canary/main.go b/cmd/canary/main.go
index 7ad258e70..401e50f6f 100644
--- a/cmd/canary/main.go
+++ b/cmd/canary/main.go
@@ -29,7 +29,7 @@ import (
 	"github.com/urfave/cli"
 
 	"github.com/uber/cadence/canary"
-	"github.com/uber/cadence/common/service/config"
+	"github.com/uber/cadence/common/config"
 )
 
 func startHandler(c *cli.Context) {
diff --git a/cmd/server/cadence/cadence.go b/cmd/server/cadence/cadence.go
index 601a7e922..3a4eaf45c 100644
--- a/cmd/server/cadence/cadence.go
+++ b/cmd/server/cadence/cadence.go
@@ -31,7 +31,7 @@ import (
 	"github.com/urfave/cli"
 
 	"github.com/uber/cadence/common"
-	"github.com/uber/cadence/common/service/config"
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/tools/cassandra"
 	"github.com/uber/cadence/tools/sql"
 )
diff --git a/cmd/server/cadence/server.go b/cmd/server/cadence/server.go
index 4d1848d79..41f20dd0e 100644
--- a/cmd/server/cadence/server.go
+++ b/cmd/server/cadence/server.go
@@ -33,14 +33,14 @@ import (
 	"github.com/uber/cadence/common/authorization"
 	"github.com/uber/cadence/common/blobstore/filestore"
 	"github.com/uber/cadence/common/cluster"
+	"github.com/uber/cadence/common/config"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/elasticsearch"
 	"github.com/uber/cadence/common/log/loggerimpl"
 	"github.com/uber/cadence/common/log/tag"
 	"github.com/uber/cadence/common/messaging/kafka"
 	"github.com/uber/cadence/common/metrics"
 	"github.com/uber/cadence/common/service"
-	"github.com/uber/cadence/common/service/config"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/service/frontend"
 	"github.com/uber/cadence/service/history"
 	"github.com/uber/cadence/service/matching"
diff --git a/common/archiver/README.md b/common/archiver/README.md
index cf01a5fda..ec9f3c715 100644
--- a/common/archiver/README.md
+++ b/common/archiver/README.md
@@ -69,7 +69,7 @@ type VisibilityArchiver interface {
 
 Modify the `./provider/provider.go` file so that the `ArchiverProvider` knows how to create an instance of your archiver. 
 Also, add configs for you archiver to static yaml config files and modify the `HistoryArchiverProvider` 
-and `VisibilityArchiverProvider` struct in the `../common/service/config.go` accordingly.
+and `VisibilityArchiverProvider` struct in the `../common/config.go` accordingly.
 
 
 ## FAQ
diff --git a/common/archiver/archivalMetadata.go b/common/archiver/archivalMetadata.go
index 16210d20a..8b9f2697b 100644
--- a/common/archiver/archivalMetadata.go
+++ b/common/archiver/archivalMetadata.go
@@ -25,8 +25,8 @@ import (
 	"strings"
 
 	"github.com/uber/cadence/common"
-	"github.com/uber/cadence/common/service/config"
-	"github.com/uber/cadence/common/service/dynamicconfig"
+	"github.com/uber/cadence/common/config"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/types"
 )
 
diff --git a/common/archiver/filestore/historyArchiver.go b/common/archiver/filestore/historyArchiver.go
index 1a60c07b8..bacd0cf49 100644
--- a/common/archiver/filestore/historyArchiver.go
+++ b/common/archiver/filestore/historyArchiver.go
@@ -44,9 +44,9 @@ import (
 	"github.com/uber/cadence/common"
 	"github.com/uber/cadence/common/archiver"
 	"github.com/uber/cadence/common/backoff"
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/common/log/tag"
 	"github.com/uber/cadence/common/persistence"
-	"github.com/uber/cadence/common/service/config"
 	"github.com/uber/cadence/common/types"
 	"github.com/uber/cadence/common/util"
 )
diff --git a/common/archiver/filestore/visibilityArchiver.go b/common/archiver/filestore/visibilityArchiver.go
index 74734d7aa..8a73403e2 100644
--- a/common/archiver/filestore/visibilityArchiver.go
+++ b/common/archiver/filestore/visibilityArchiver.go
@@ -31,8 +31,8 @@ import (
 
 	"github.com/uber/cadence/common"
 	"github.com/uber/cadence/common/archiver"
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/common/log/tag"
-	"github.com/uber/cadence/common/service/config"
 	"github.com/uber/cadence/common/types"
 	"github.com/uber/cadence/common/util"
 )
diff --git a/common/archiver/gcloud/connector/client.go b/common/archiver/gcloud/connector/client.go
index ba9391cba..deaa87b7d 100644
--- a/common/archiver/gcloud/connector/client.go
+++ b/common/archiver/gcloud/connector/client.go
@@ -33,7 +33,7 @@ import (
 	"google.golang.org/api/iterator"
 
 	"github.com/uber/cadence/common/archiver"
-	"github.com/uber/cadence/common/service/config"
+	"github.com/uber/cadence/common/config"
 )
 
 const (
diff --git a/common/archiver/gcloud/historyArchiver.go b/common/archiver/gcloud/historyArchiver.go
index ccb224563..2d4df3b42 100644
--- a/common/archiver/gcloud/historyArchiver.go
+++ b/common/archiver/gcloud/historyArchiver.go
@@ -30,10 +30,10 @@ import (
 	"github.com/uber/cadence/common/archiver"
 	"github.com/uber/cadence/common/archiver/gcloud/connector"
 	"github.com/uber/cadence/common/backoff"
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/common/log/tag"
 	"github.com/uber/cadence/common/metrics"
 	"github.com/uber/cadence/common/persistence"
-	"github.com/uber/cadence/common/service/config"
 	"github.com/uber/cadence/common/types"
 )
 
diff --git a/common/archiver/gcloud/visibilityArchiver.go b/common/archiver/gcloud/visibilityArchiver.go
index b483e3619..7e0936adc 100644
--- a/common/archiver/gcloud/visibilityArchiver.go
+++ b/common/archiver/gcloud/visibilityArchiver.go
@@ -29,9 +29,9 @@ import (
 
 	"github.com/uber/cadence/common/archiver"
 	"github.com/uber/cadence/common/archiver/gcloud/connector"
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/common/log/tag"
 	"github.com/uber/cadence/common/metrics"
-	"github.com/uber/cadence/common/service/config"
 	"github.com/uber/cadence/common/types"
 )
 
diff --git a/common/archiver/provider/provider.go b/common/archiver/provider/provider.go
index c3114917e..8883c84f3 100644
--- a/common/archiver/provider/provider.go
+++ b/common/archiver/provider/provider.go
@@ -29,7 +29,7 @@ import (
 	"github.com/uber/cadence/common/archiver"
 	"github.com/uber/cadence/common/archiver/filestore"
 	"github.com/uber/cadence/common/archiver/s3store"
-	"github.com/uber/cadence/common/service/config"
+	"github.com/uber/cadence/common/config"
 )
 
 var (
diff --git a/common/archiver/s3store/historyArchiver.go b/common/archiver/s3store/historyArchiver.go
index e8cc74566..f6c8dac85 100644
--- a/common/archiver/s3store/historyArchiver.go
+++ b/common/archiver/s3store/historyArchiver.go
@@ -40,10 +40,10 @@ import (
 	"github.com/uber/cadence/common"
 	"github.com/uber/cadence/common/archiver"
 	"github.com/uber/cadence/common/backoff"
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/common/log/tag"
 	"github.com/uber/cadence/common/metrics"
 	"github.com/uber/cadence/common/persistence"
-	"github.com/uber/cadence/common/service/config"
 	"github.com/uber/cadence/common/types"
 )
 
diff --git a/common/archiver/s3store/visibilityArchiver.go b/common/archiver/s3store/visibilityArchiver.go
index 12a15a059..66a21bc51 100644
--- a/common/archiver/s3store/visibilityArchiver.go
+++ b/common/archiver/s3store/visibilityArchiver.go
@@ -31,8 +31,8 @@ import (
 	"github.com/aws/aws-sdk-go/service/s3/s3iface"
 
 	"github.com/uber/cadence/common/archiver"
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/common/log/tag"
-	"github.com/uber/cadence/common/service/config"
 	"github.com/uber/cadence/common/types"
 )
 
diff --git a/common/blobstore/filestore/client.go b/common/blobstore/filestore/client.go
index 321be7e0d..affe5e8c5 100644
--- a/common/blobstore/filestore/client.go
+++ b/common/blobstore/filestore/client.go
@@ -30,7 +30,7 @@ import (
 	"os"
 
 	"github.com/uber/cadence/common/blobstore"
-	"github.com/uber/cadence/common/service/config"
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/common/util"
 )
 
diff --git a/common/cluster/metadata.go b/common/cluster/metadata.go
index abceca75d..4b7df6e8a 100644
--- a/common/cluster/metadata.go
+++ b/common/cluster/metadata.go
@@ -26,9 +26,9 @@ import (
 	"fmt"
 
 	"github.com/uber/cadence/common"
+	"github.com/uber/cadence/common/config"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
-	"github.com/uber/cadence/common/service/config"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 )
 
 type (
diff --git a/common/cluster/metadata_mock.go b/common/cluster/metadata_mock.go
index 25546a626..0c5bacc7d 100644
--- a/common/cluster/metadata_mock.go
+++ b/common/cluster/metadata_mock.go
@@ -31,7 +31,7 @@ import (
 
 	gomock "github.com/golang/mock/gomock"
 
-	config "github.com/uber/cadence/common/service/config"
+	config "github.com/uber/cadence/common/config"
 )
 
 // MockMetadata is a mock of Metadata interface
diff --git a/common/service/config/archival.go b/common/config/archival.go
similarity index 100%
rename from common/service/config/archival.go
rename to common/config/archival.go
diff --git a/common/service/config/config.go b/common/config/config.go
similarity index 99%
rename from common/service/config/config.go
rename to common/config/config.go
index 39d7d903f..eb70f8879 100644
--- a/common/service/config/config.go
+++ b/common/config/config.go
@@ -30,8 +30,8 @@ import (
 
 	"github.com/uber/cadence/common"
 	"github.com/uber/cadence/common/auth"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/persistence/nosql/nosqlplugin/cassandra/gocql"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 )
 
 type (
diff --git a/common/service/config/elasticsearch.go b/common/config/elasticsearch.go
similarity index 100%
rename from common/service/config/elasticsearch.go
rename to common/config/elasticsearch.go
diff --git a/common/service/config/kafkaConfig.go b/common/config/kafkaConfig.go
similarity index 100%
rename from common/service/config/kafkaConfig.go
rename to common/config/kafkaConfig.go
diff --git a/common/service/config/loader.go b/common/config/loader.go
similarity index 100%
rename from common/service/config/loader.go
rename to common/config/loader.go
diff --git a/common/service/config/loader_test.go b/common/config/loader_test.go
similarity index 100%
rename from common/service/config/loader_test.go
rename to common/config/loader_test.go
diff --git a/common/service/config/localip.go b/common/config/localip.go
similarity index 100%
rename from common/service/config/localip.go
rename to common/config/localip.go
diff --git a/common/service/config/localip_test.go b/common/config/localip_test.go
similarity index 100%
rename from common/service/config/localip_test.go
rename to common/config/localip_test.go
diff --git a/common/service/config/log.go b/common/config/log.go
similarity index 100%
rename from common/service/config/log.go
rename to common/config/log.go
diff --git a/common/service/config/log_test.go b/common/config/log_test.go
similarity index 100%
rename from common/service/config/log_test.go
rename to common/config/log_test.go
diff --git a/common/service/config/metrics.go b/common/config/metrics.go
similarity index 100%
rename from common/service/config/metrics.go
rename to common/config/metrics.go
diff --git a/common/service/config/metrics_test.go b/common/config/metrics_test.go
similarity index 100%
rename from common/service/config/metrics_test.go
rename to common/config/metrics_test.go
diff --git a/common/service/config/persistence.go b/common/config/persistence.go
similarity index 100%
rename from common/service/config/persistence.go
rename to common/config/persistence.go
diff --git a/common/service/config/pprof.go b/common/config/pprof.go
similarity index 100%
rename from common/service/config/pprof.go
rename to common/config/pprof.go
diff --git a/common/service/config/ringpop.go b/common/config/ringpop.go
similarity index 100%
rename from common/service/config/ringpop.go
rename to common/config/ringpop.go
diff --git a/common/service/config/ringpop_test.go b/common/config/ringpop_test.go
similarity index 100%
rename from common/service/config/ringpop_test.go
rename to common/config/ringpop_test.go
diff --git a/common/service/config/rpc.go b/common/config/rpc.go
similarity index 100%
rename from common/service/config/rpc.go
rename to common/config/rpc.go
diff --git a/common/domain/failover_watcher.go b/common/domain/failover_watcher.go
index a4b14c6a6..012c14d7a 100644
--- a/common/domain/failover_watcher.go
+++ b/common/domain/failover_watcher.go
@@ -31,11 +31,11 @@ import (
 	"github.com/uber/cadence/common/backoff"
 	"github.com/uber/cadence/common/cache"
 	"github.com/uber/cadence/common/clock"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/tag"
 	"github.com/uber/cadence/common/metrics"
 	"github.com/uber/cadence/common/persistence"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 )
 
 const (
diff --git a/common/domain/handler.go b/common/domain/handler.go
index b30e9a338..c7b730916 100644
--- a/common/domain/handler.go
+++ b/common/domain/handler.go
@@ -34,10 +34,10 @@ import (
 	"github.com/uber/cadence/common/archiver/provider"
 	"github.com/uber/cadence/common/clock"
 	"github.com/uber/cadence/common/cluster"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/tag"
 	"github.com/uber/cadence/common/persistence"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/common/types"
 )
 
diff --git a/common/service/dynamicconfig/clientInterface.go b/common/dynamicconfig/clientInterface.go
similarity index 98%
rename from common/service/dynamicconfig/clientInterface.go
rename to common/dynamicconfig/clientInterface.go
index 02c599182..3927fd3d2 100644
--- a/common/service/dynamicconfig/clientInterface.go
+++ b/common/dynamicconfig/clientInterface.go
@@ -18,7 +18,7 @@
 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 // THE SOFTWARE.
 
-//go:generate mockgen -package $GOPACKAGE -source $GOFILE -destination clientInterface_mock.go -self_package github.com/uber/cadence/common/service/dynamicconfig
+//go:generate mockgen -package $GOPACKAGE -source $GOFILE -destination clientInterface_mock.go -self_package github.com/uber/cadence/common/dynamicconfig
 
 package dynamicconfig
 
diff --git a/common/service/dynamicconfig/clientInterface_mock.go b/common/dynamicconfig/clientInterface_mock.go
similarity index 100%
rename from common/service/dynamicconfig/clientInterface_mock.go
rename to common/dynamicconfig/clientInterface_mock.go
diff --git a/common/service/dynamicconfig/cmp.go b/common/dynamicconfig/cmp.go
similarity index 100%
rename from common/service/dynamicconfig/cmp.go
rename to common/dynamicconfig/cmp.go
diff --git a/common/service/dynamicconfig/cmp_test.go b/common/dynamicconfig/cmp_test.go
similarity index 100%
rename from common/service/dynamicconfig/cmp_test.go
rename to common/dynamicconfig/cmp_test.go
diff --git a/common/service/dynamicconfig/config.go b/common/dynamicconfig/config.go
similarity index 100%
rename from common/service/dynamicconfig/config.go
rename to common/dynamicconfig/config.go
diff --git a/common/service/dynamicconfig/config/testConfig.yaml b/common/dynamicconfig/config/testConfig.yaml
similarity index 100%
rename from common/service/dynamicconfig/config/testConfig.yaml
rename to common/dynamicconfig/config/testConfig.yaml
diff --git a/common/service/dynamicconfig/config_benchmark_test.go b/common/dynamicconfig/config_benchmark_test.go
similarity index 100%
rename from common/service/dynamicconfig/config_benchmark_test.go
rename to common/dynamicconfig/config_benchmark_test.go
diff --git a/common/service/dynamicconfig/config_mock.go b/common/dynamicconfig/config_mock.go
similarity index 100%
rename from common/service/dynamicconfig/config_mock.go
rename to common/dynamicconfig/config_mock.go
diff --git a/common/service/dynamicconfig/config_test.go b/common/dynamicconfig/config_test.go
similarity index 100%
rename from common/service/dynamicconfig/config_test.go
rename to common/dynamicconfig/config_test.go
diff --git a/common/service/dynamicconfig/constants.go b/common/dynamicconfig/constants.go
similarity index 100%
rename from common/service/dynamicconfig/constants.go
rename to common/dynamicconfig/constants.go
diff --git a/common/service/dynamicconfig/file_based_client.go b/common/dynamicconfig/file_based_client.go
similarity index 100%
rename from common/service/dynamicconfig/file_based_client.go
rename to common/dynamicconfig/file_based_client.go
diff --git a/common/service/dynamicconfig/file_based_client_test.go b/common/dynamicconfig/file_based_client_test.go
similarity index 100%
rename from common/service/dynamicconfig/file_based_client_test.go
rename to common/dynamicconfig/file_based_client_test.go
diff --git a/common/service/dynamicconfig/inMemoryClient.go b/common/dynamicconfig/inMemoryClient.go
similarity index 100%
rename from common/service/dynamicconfig/inMemoryClient.go
rename to common/dynamicconfig/inMemoryClient.go
diff --git a/common/service/dynamicconfig/nopClient.go b/common/dynamicconfig/nopClient.go
similarity index 100%
rename from common/service/dynamicconfig/nopClient.go
rename to common/dynamicconfig/nopClient.go
diff --git a/common/elasticsearch/client_v6.go b/common/elasticsearch/client_v6.go
index d18182738..24d3f30fc 100644
--- a/common/elasticsearch/client_v6.go
+++ b/common/elasticsearch/client_v6.go
@@ -37,11 +37,11 @@ import (
 	esaws "github.com/olivere/elastic/aws/v4"
 
 	"github.com/uber/cadence/common"
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/tag"
 	"github.com/uber/cadence/common/metrics"
 	p "github.com/uber/cadence/common/persistence"
-	"github.com/uber/cadence/common/service/config"
 	"github.com/uber/cadence/common/types"
 	"github.com/uber/cadence/common/types/mapper/thrift"
 )
diff --git a/common/elasticsearch/client_v7.go b/common/elasticsearch/client_v7.go
index 5806f5509..d18a13a7b 100644
--- a/common/elasticsearch/client_v7.go
+++ b/common/elasticsearch/client_v7.go
@@ -37,11 +37,11 @@ import (
 	esaws "github.com/olivere/elastic/v7/aws/v4"
 
 	"github.com/uber/cadence/common"
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/tag"
 	"github.com/uber/cadence/common/metrics"
 	p "github.com/uber/cadence/common/persistence"
-	"github.com/uber/cadence/common/service/config"
 	"github.com/uber/cadence/common/types"
 	"github.com/uber/cadence/common/types/mapper/thrift"
 )
diff --git a/common/elasticsearch/interfaces.go b/common/elasticsearch/interfaces.go
index 102f818d1..26a6fd441 100644
--- a/common/elasticsearch/interfaces.go
+++ b/common/elasticsearch/interfaces.go
@@ -26,10 +26,10 @@ import (
 	"time"
 
 	workflow "github.com/uber/cadence/.gen/go/shared"
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/metrics"
 	p "github.com/uber/cadence/common/persistence"
-	"github.com/uber/cadence/common/service/config"
 )
 
 // NewGenericClient create a ES client
diff --git a/common/elasticsearch/validator/queryValidator.go b/common/elasticsearch/validator/queryValidator.go
index 580540ef5..94b32d83c 100644
--- a/common/elasticsearch/validator/queryValidator.go
+++ b/common/elasticsearch/validator/queryValidator.go
@@ -29,7 +29,7 @@ import (
 
 	"github.com/uber/cadence/common"
 	"github.com/uber/cadence/common/definition"
-	"github.com/uber/cadence/common/service/dynamicconfig"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/types"
 )
 
diff --git a/common/elasticsearch/validator/searchAttrValidator.go b/common/elasticsearch/validator/searchAttrValidator.go
index f9d34fb51..e117fc4fb 100644
--- a/common/elasticsearch/validator/searchAttrValidator.go
+++ b/common/elasticsearch/validator/searchAttrValidator.go
@@ -25,9 +25,9 @@ import (
 
 	"github.com/uber/cadence/common"
 	"github.com/uber/cadence/common/definition"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/tag"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/common/types"
 )
 
diff --git a/common/log/loggerimpl/throttle.go b/common/log/loggerimpl/throttle.go
index 46464e96c..2b43feec5 100644
--- a/common/log/loggerimpl/throttle.go
+++ b/common/log/loggerimpl/throttle.go
@@ -23,10 +23,10 @@ package loggerimpl
 import (
 	"sync/atomic"
 
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/tag"
 	"github.com/uber/cadence/common/quotas"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 )
 
 type throttledLogger struct {
diff --git a/common/messaging/kafka/clientImpl.go b/common/messaging/kafka/clientImpl.go
index 9801db52e..9033f4b3a 100644
--- a/common/messaging/kafka/clientImpl.go
+++ b/common/messaging/kafka/clientImpl.go
@@ -32,10 +32,10 @@ import (
 	"github.com/uber-go/tally"
 
 	"github.com/uber/cadence/common/auth"
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/messaging"
 	"github.com/uber/cadence/common/metrics"
-	"github.com/uber/cadence/common/service/config"
 )
 
 type (
diff --git a/common/messaging/kafka/consumerImpl.go b/common/messaging/kafka/consumerImpl.go
index 07d27a422..ef32a956a 100644
--- a/common/messaging/kafka/consumerImpl.go
+++ b/common/messaging/kafka/consumerImpl.go
@@ -29,11 +29,11 @@ import (
 
 	"github.com/uber/cadence/common"
 	"github.com/uber/cadence/common/backoff"
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/tag"
 	"github.com/uber/cadence/common/messaging"
 	"github.com/uber/cadence/common/metrics"
-	"github.com/uber/cadence/common/service/config"
 )
 
 const rcvBufferSize = 2 * 1024
diff --git a/common/mocks/ClusterMetadata.go b/common/mocks/ClusterMetadata.go
index bf495a398..6b0c8607a 100644
--- a/common/mocks/ClusterMetadata.go
+++ b/common/mocks/ClusterMetadata.go
@@ -23,7 +23,7 @@ package mocks
 import (
 	"github.com/stretchr/testify/mock"
 
-	"github.com/uber/cadence/common/service/config"
+	"github.com/uber/cadence/common/config"
 )
 
 // ClusterMetadata is an autogenerated mock type for the Metadata type
diff --git a/common/ndc/history_resender.go b/common/ndc/history_resender.go
index 8ea65ea44..13ca6cf16 100644
--- a/common/ndc/history_resender.go
+++ b/common/ndc/history_resender.go
@@ -30,12 +30,12 @@ import (
 	adminClient "github.com/uber/cadence/client/admin"
 	"github.com/uber/cadence/common/cache"
 	"github.com/uber/cadence/common/collection"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/tag"
 	"github.com/uber/cadence/common/persistence"
 	"github.com/uber/cadence/common/reconciliation/entity"
 	"github.com/uber/cadence/common/reconciliation/invariant"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/common/types"
 )
 
diff --git a/common/persistence/cassandra/cassandraHistoryPersistence.go b/common/persistence/cassandra/cassandraHistoryPersistence.go
index eca7c7abf..dbd28a9fb 100644
--- a/common/persistence/cassandra/cassandraHistoryPersistence.go
+++ b/common/persistence/cassandra/cassandraHistoryPersistence.go
@@ -26,12 +26,12 @@ import (
 	"time"
 
 	"github.com/uber/cadence/common"
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/common/log"
 	p "github.com/uber/cadence/common/persistence"
 	"github.com/uber/cadence/common/persistence/nosql/nosqlplugin"
 	"github.com/uber/cadence/common/persistence/nosql/nosqlplugin/cassandra"
 	"github.com/uber/cadence/common/persistence/nosql/nosqlplugin/cassandra/gocql"
-	"github.com/uber/cadence/common/service/config"
 	"github.com/uber/cadence/common/types"
 )
 
diff --git a/common/persistence/cassandra/cassandraMetadataPersistenceV2.go b/common/persistence/cassandra/cassandraMetadataPersistenceV2.go
index 1ed9604b6..5679f43eb 100644
--- a/common/persistence/cassandra/cassandraMetadataPersistenceV2.go
+++ b/common/persistence/cassandra/cassandraMetadataPersistenceV2.go
@@ -25,11 +25,11 @@ import (
 	"fmt"
 
 	"github.com/uber/cadence/common"
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/common/log"
 	p "github.com/uber/cadence/common/persistence"
 	"github.com/uber/cadence/common/persistence/nosql/nosqlplugin"
 	"github.com/uber/cadence/common/persistence/nosql/nosqlplugin/cassandra"
-	"github.com/uber/cadence/common/service/config"
 	"github.com/uber/cadence/common/types"
 )
 
diff --git a/common/persistence/cassandra/cassandraQueue.go b/common/persistence/cassandra/cassandraQueue.go
index d01c4db4c..2897d4445 100644
--- a/common/persistence/cassandra/cassandraQueue.go
+++ b/common/persistence/cassandra/cassandraQueue.go
@@ -24,11 +24,11 @@ import (
 	"context"
 	"fmt"
 
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/persistence"
 	"github.com/uber/cadence/common/persistence/nosql/nosqlplugin"
 	"github.com/uber/cadence/common/persistence/nosql/nosqlplugin/cassandra"
-	"github.com/uber/cadence/common/service/config"
 	"github.com/uber/cadence/common/types"
 )
 
diff --git a/common/persistence/cassandra/cassandraShardPersistence.go b/common/persistence/cassandra/cassandraShardPersistence.go
index b1b48c3b8..1b17978b9 100644
--- a/common/persistence/cassandra/cassandraShardPersistence.go
+++ b/common/persistence/cassandra/cassandraShardPersistence.go
@@ -26,12 +26,12 @@ import (
 	"strings"
 	"time"
 
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/tag"
 	p "github.com/uber/cadence/common/persistence"
 	"github.com/uber/cadence/common/persistence/nosql/nosqlplugin/cassandra"
 	"github.com/uber/cadence/common/persistence/nosql/nosqlplugin/cassandra/gocql"
-	"github.com/uber/cadence/common/service/config"
 	"github.com/uber/cadence/common/types"
 )
 
diff --git a/common/persistence/cassandra/cassandraTaskPersistence.go b/common/persistence/cassandra/cassandraTaskPersistence.go
index 4c88824fd..4386be997 100644
--- a/common/persistence/cassandra/cassandraTaskPersistence.go
+++ b/common/persistence/cassandra/cassandraTaskPersistence.go
@@ -27,11 +27,11 @@ import (
 	"strings"
 	"time"
 
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/common/log"
 	p "github.com/uber/cadence/common/persistence"
 	"github.com/uber/cadence/common/persistence/nosql/nosqlplugin/cassandra"
 	"github.com/uber/cadence/common/persistence/nosql/nosqlplugin/cassandra/gocql"
-	"github.com/uber/cadence/common/service/config"
 	"github.com/uber/cadence/common/types"
 )
 
diff --git a/common/persistence/cassandra/cassandraVisibilityPersistence.go b/common/persistence/cassandra/cassandraVisibilityPersistence.go
index 6e825256d..b6672d3a6 100644
--- a/common/persistence/cassandra/cassandraVisibilityPersistence.go
+++ b/common/persistence/cassandra/cassandraVisibilityPersistence.go
@@ -27,11 +27,11 @@ import (
 
 	workflow "github.com/uber/cadence/.gen/go/shared"
 	"github.com/uber/cadence/common"
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/common/log"
 	p "github.com/uber/cadence/common/persistence"
 	"github.com/uber/cadence/common/persistence/nosql/nosqlplugin/cassandra"
 	"github.com/uber/cadence/common/persistence/nosql/nosqlplugin/cassandra/gocql"
-	"github.com/uber/cadence/common/service/config"
 	"github.com/uber/cadence/common/types"
 	"github.com/uber/cadence/common/types/mapper/thrift"
 )
diff --git a/common/persistence/cassandra/factory.go b/common/persistence/cassandra/factory.go
index f02e7172f..1f40492f0 100644
--- a/common/persistence/cassandra/factory.go
+++ b/common/persistence/cassandra/factory.go
@@ -23,11 +23,11 @@ package cassandra
 import (
 	"sync"
 
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/common/log"
 	p "github.com/uber/cadence/common/persistence"
 	"github.com/uber/cadence/common/persistence/nosql/nosqlplugin/cassandra"
 	"github.com/uber/cadence/common/persistence/nosql/nosqlplugin/cassandra/gocql"
-	"github.com/uber/cadence/common/service/config"
 )
 
 type (
diff --git a/common/persistence/client/factory.go b/common/persistence/client/factory.go
index 341a7260d..033cda997 100644
--- a/common/persistence/client/factory.go
+++ b/common/persistence/client/factory.go
@@ -26,6 +26,8 @@ import (
 	"github.com/uber/cadence/common/log/tag"
 
 	"github.com/uber/cadence/common"
+	"github.com/uber/cadence/common/config"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/metrics"
 	p "github.com/uber/cadence/common/persistence"
@@ -33,8 +35,6 @@ import (
 	"github.com/uber/cadence/common/persistence/serialization"
 	"github.com/uber/cadence/common/persistence/sql"
 	"github.com/uber/cadence/common/quotas"
-	"github.com/uber/cadence/common/service/config"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 )
 
 type (
diff --git a/common/persistence/elasticsearch/esVisibilityManager.go b/common/persistence/elasticsearch/esVisibilityManager.go
index 5c3695092..6831a9a52 100644
--- a/common/persistence/elasticsearch/esVisibilityManager.go
+++ b/common/persistence/elasticsearch/esVisibilityManager.go
@@ -21,13 +21,13 @@
 package elasticsearch
 
 import (
+	"github.com/uber/cadence/common/config"
 	es "github.com/uber/cadence/common/elasticsearch"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/messaging"
 	"github.com/uber/cadence/common/metrics"
 	p "github.com/uber/cadence/common/persistence"
 	"github.com/uber/cadence/common/quotas"
-	"github.com/uber/cadence/common/service/config"
 )
 
 // NewESVisibilityManager create a visibility manager for ElasticSearch
diff --git a/common/persistence/elasticsearch/esVisibilityStore.go b/common/persistence/elasticsearch/esVisibilityStore.go
index 5110dd85f..4bad3743a 100644
--- a/common/persistence/elasticsearch/esVisibilityStore.go
+++ b/common/persistence/elasticsearch/esVisibilityStore.go
@@ -37,13 +37,13 @@ import (
 	"github.com/uber/cadence/.gen/go/indexer"
 	workflow "github.com/uber/cadence/.gen/go/shared"
 	"github.com/uber/cadence/common"
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/common/definition"
 	es "github.com/uber/cadence/common/elasticsearch"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/tag"
 	"github.com/uber/cadence/common/messaging"
 	p "github.com/uber/cadence/common/persistence"
-	"github.com/uber/cadence/common/service/config"
 	"github.com/uber/cadence/common/types"
 	"github.com/uber/cadence/common/types/mapper/thrift"
 )
diff --git a/common/persistence/historyStore.go b/common/persistence/historyStore.go
index 890e2c5cc..a941c552e 100644
--- a/common/persistence/historyStore.go
+++ b/common/persistence/historyStore.go
@@ -29,9 +29,9 @@ import (
 	workflow "github.com/uber/cadence/.gen/go/shared"
 	"github.com/uber/cadence/common"
 	"github.com/uber/cadence/common/codec"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/tag"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/common/types"
 	"github.com/uber/cadence/common/types/mapper/thrift"
 )
diff --git a/common/persistence/nosql/nosqlplugin/cassandra/db.go b/common/persistence/nosql/nosqlplugin/cassandra/db.go
index d43407a74..70ad452fe 100644
--- a/common/persistence/nosql/nosqlplugin/cassandra/db.go
+++ b/common/persistence/nosql/nosqlplugin/cassandra/db.go
@@ -23,10 +23,10 @@ package cassandra
 import (
 	"errors"
 
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/persistence/nosql/nosqlplugin"
 	"github.com/uber/cadence/common/persistence/nosql/nosqlplugin/cassandra/gocql"
-	"github.com/uber/cadence/common/service/config"
 )
 
 var (
diff --git a/common/persistence/nosql/nosqlplugin/cassandra/session.go b/common/persistence/nosql/nosqlplugin/cassandra/session.go
index eb316fbbc..7c730e29f 100644
--- a/common/persistence/nosql/nosqlplugin/cassandra/session.go
+++ b/common/persistence/nosql/nosqlplugin/cassandra/session.go
@@ -23,8 +23,8 @@ package cassandra
 import (
 	"time"
 
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/common/persistence/nosql/nosqlplugin/cassandra/gocql"
-	"github.com/uber/cadence/common/service/config"
 )
 
 const (
diff --git a/common/persistence/sql/factory.go b/common/persistence/sql/factory.go
index ca4a1e20a..4766d1860 100644
--- a/common/persistence/sql/factory.go
+++ b/common/persistence/sql/factory.go
@@ -26,10 +26,10 @@ import (
 
 	"github.com/uber/cadence/common/persistence/serialization"
 
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/common/log"
 	p "github.com/uber/cadence/common/persistence"
 	"github.com/uber/cadence/common/persistence/sql/sqlplugin"
-	"github.com/uber/cadence/common/service/config"
 )
 
 type (
diff --git a/common/persistence/sql/sqlVisibilityStore.go b/common/persistence/sql/sqlVisibilityStore.go
index 8027f4656..1dcde1d25 100644
--- a/common/persistence/sql/sqlVisibilityStore.go
+++ b/common/persistence/sql/sqlVisibilityStore.go
@@ -29,10 +29,10 @@ import (
 
 	workflow "github.com/uber/cadence/.gen/go/shared"
 	"github.com/uber/cadence/common"
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/common/log"
 	p "github.com/uber/cadence/common/persistence"
 	"github.com/uber/cadence/common/persistence/sql/sqlplugin"
-	"github.com/uber/cadence/common/service/config"
 	"github.com/uber/cadence/common/types"
 	"github.com/uber/cadence/common/types/mapper/thrift"
 )
diff --git a/common/persistence/sql/sqlplugin/interfaces.go b/common/persistence/sql/sqlplugin/interfaces.go
index 2f92917bb..68add60f5 100644
--- a/common/persistence/sql/sqlplugin/interfaces.go
+++ b/common/persistence/sql/sqlplugin/interfaces.go
@@ -26,9 +26,9 @@ import (
 	"errors"
 	"time"
 
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/common/persistence"
 	"github.com/uber/cadence/common/persistence/serialization"
-	"github.com/uber/cadence/common/service/config"
 )
 
 var (
diff --git a/common/persistence/sql/sqlplugin/mysql/plugin.go b/common/persistence/sql/sqlplugin/mysql/plugin.go
index 401de0c03..5cfe71aed 100644
--- a/common/persistence/sql/sqlplugin/mysql/plugin.go
+++ b/common/persistence/sql/sqlplugin/mysql/plugin.go
@@ -34,10 +34,10 @@ import (
 	"github.com/iancoleman/strcase"
 	"github.com/jmoiron/sqlx"
 
+	"github.com/uber/cadence/common/config"
 	pt "github.com/uber/cadence/common/persistence/persistence-tests"
 	"github.com/uber/cadence/common/persistence/sql"
 	"github.com/uber/cadence/common/persistence/sql/sqlplugin"
-	"github.com/uber/cadence/common/service/config"
 	"github.com/uber/cadence/environment"
 )
 
diff --git a/common/persistence/sql/sqlplugin/postgres/plugin.go b/common/persistence/sql/sqlplugin/postgres/plugin.go
index d53702b26..d34b53af2 100644
--- a/common/persistence/sql/sqlplugin/postgres/plugin.go
+++ b/common/persistence/sql/sqlplugin/postgres/plugin.go
@@ -27,10 +27,10 @@ import (
 	"os"
 	"runtime"
 
+	"github.com/uber/cadence/common/config"
 	pt "github.com/uber/cadence/common/persistence/persistence-tests"
 	"github.com/uber/cadence/common/persistence/sql"
 	"github.com/uber/cadence/common/persistence/sql/sqlplugin"
-	"github.com/uber/cadence/common/service/config"
 	"github.com/uber/cadence/environment"
 
 	"github.com/iancoleman/strcase"
diff --git a/common/persistence/sql/store.go b/common/persistence/sql/store.go
index 3bbdf1b77..036a589d2 100644
--- a/common/persistence/sql/store.go
+++ b/common/persistence/sql/store.go
@@ -23,8 +23,8 @@ package sql
 import (
 	"fmt"
 
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/common/persistence/sql/sqlplugin"
-	"github.com/uber/cadence/common/service/config"
 )
 
 var supportedPlugins = map[string]sqlplugin.Plugin{}
diff --git a/common/persistence/visibilitySamplingClient.go b/common/persistence/visibilitySamplingClient.go
index 9ac02c0fa..f6e75c200 100644
--- a/common/persistence/visibilitySamplingClient.go
+++ b/common/persistence/visibilitySamplingClient.go
@@ -25,10 +25,10 @@ import (
 	"sync"
 
 	"github.com/uber/cadence/common/clock"
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/tag"
 	"github.com/uber/cadence/common/metrics"
-	"github.com/uber/cadence/common/service/config"
 	"github.com/uber/cadence/common/tokenbucket"
 	"github.com/uber/cadence/common/types"
 )
diff --git a/common/persistence/visibilityWrapper.go b/common/persistence/visibilityWrapper.go
index 7d77e80cf..1ba9c6731 100644
--- a/common/persistence/visibilityWrapper.go
+++ b/common/persistence/visibilityWrapper.go
@@ -25,7 +25,7 @@ import (
 	"fmt"
 
 	"github.com/uber/cadence/common"
-	"github.com/uber/cadence/common/service/dynamicconfig"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/types"
 )
 
diff --git a/common/resource/resourceImpl.go b/common/resource/resourceImpl.go
index 1a0e9a01c..8164111e2 100644
--- a/common/resource/resourceImpl.go
+++ b/common/resource/resourceImpl.go
@@ -43,6 +43,7 @@ import (
 	"github.com/uber/cadence/common/clock"
 	"github.com/uber/cadence/common/cluster"
 	"github.com/uber/cadence/common/domain"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/loggerimpl"
 	"github.com/uber/cadence/common/log/tag"
@@ -52,7 +53,6 @@ import (
 	"github.com/uber/cadence/common/persistence"
 	persistenceClient "github.com/uber/cadence/common/persistence/client"
 	"github.com/uber/cadence/common/service"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 )
 
 type (
diff --git a/common/service/service.go b/common/service/service.go
index 84b18f487..4c4c30ce7 100644
--- a/common/service/service.go
+++ b/common/service/service.go
@@ -38,6 +38,8 @@ import (
 	"github.com/uber/cadence/common/blobstore"
 	"github.com/uber/cadence/common/clock"
 	"github.com/uber/cadence/common/cluster"
+	"github.com/uber/cadence/common/config"
+	"github.com/uber/cadence/common/dynamicconfig"
 	es "github.com/uber/cadence/common/elasticsearch"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/tag"
@@ -45,8 +47,6 @@ import (
 	"github.com/uber/cadence/common/messaging"
 	"github.com/uber/cadence/common/metrics"
 	"github.com/uber/cadence/common/persistence"
-	"github.com/uber/cadence/common/service/config"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 )
 
 type (
diff --git a/common/task/fifoTaskScheduler.go b/common/task/fifoTaskScheduler.go
index fefc1d7c8..9f2ce48e6 100644
--- a/common/task/fifoTaskScheduler.go
+++ b/common/task/fifoTaskScheduler.go
@@ -27,10 +27,10 @@ import (
 
 	"github.com/uber/cadence/common"
 	"github.com/uber/cadence/common/backoff"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/tag"
 	"github.com/uber/cadence/common/metrics"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 )
 
 type (
diff --git a/common/task/parallelTaskProcessor.go b/common/task/parallelTaskProcessor.go
index ac7a614d5..a0becc682 100644
--- a/common/task/parallelTaskProcessor.go
+++ b/common/task/parallelTaskProcessor.go
@@ -28,9 +28,9 @@ import (
 
 	"github.com/uber/cadence/common"
 	"github.com/uber/cadence/common/backoff"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/metrics"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 )
 
 type (
diff --git a/common/task/weightedRoundRobinTaskScheduler.go b/common/task/weightedRoundRobinTaskScheduler.go
index 9b0a1365c..908a60c24 100644
--- a/common/task/weightedRoundRobinTaskScheduler.go
+++ b/common/task/weightedRoundRobinTaskScheduler.go
@@ -29,10 +29,10 @@ import (
 
 	"github.com/uber/cadence/common"
 	"github.com/uber/cadence/common/backoff"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/tag"
 	"github.com/uber/cadence/common/metrics"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 )
 
 type (
diff --git a/common/tokenbucket/tb.go b/common/tokenbucket/tb.go
index 0b89d4c26..77475edc2 100644
--- a/common/tokenbucket/tb.go
+++ b/common/tokenbucket/tb.go
@@ -26,7 +26,7 @@ import (
 	"time"
 
 	"github.com/uber/cadence/common/clock"
-	"github.com/uber/cadence/common/service/dynamicconfig"
+	"github.com/uber/cadence/common/dynamicconfig"
 )
 
 type (
diff --git a/host/dynamicconfig.go b/host/dynamicconfig.go
index c15e27d11..19d261c00 100644
--- a/host/dynamicconfig.go
+++ b/host/dynamicconfig.go
@@ -25,7 +25,7 @@ import (
 	"time"
 
 	"github.com/uber/cadence/common"
-	"github.com/uber/cadence/common/service/dynamicconfig"
+	"github.com/uber/cadence/common/dynamicconfig"
 )
 
 var (
diff --git a/host/onebox.go b/host/onebox.go
index b29ff6a62..658eca7d2 100644
--- a/host/onebox.go
+++ b/host/onebox.go
@@ -46,7 +46,9 @@ import (
 	"github.com/uber/cadence/common/cache"
 	cc "github.com/uber/cadence/common/client"
 	"github.com/uber/cadence/common/cluster"
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/common/domain"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/elasticsearch"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/tag"
@@ -55,8 +57,6 @@ import (
 	"github.com/uber/cadence/common/metrics"
 	"github.com/uber/cadence/common/persistence"
 	"github.com/uber/cadence/common/service"
-	"github.com/uber/cadence/common/service/config"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/common/types"
 	"github.com/uber/cadence/service/frontend"
 	"github.com/uber/cadence/service/history"
diff --git a/service/frontend/adminHandler.go b/service/frontend/adminHandler.go
index e1e0208a9..8bd0274cd 100644
--- a/service/frontend/adminHandler.go
+++ b/service/frontend/adminHandler.go
@@ -35,6 +35,7 @@ import (
 	"github.com/uber/cadence/common/client"
 	"github.com/uber/cadence/common/definition"
 	"github.com/uber/cadence/common/domain"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/elasticsearch"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/tag"
@@ -43,7 +44,6 @@ import (
 	"github.com/uber/cadence/common/persistence"
 	"github.com/uber/cadence/common/resource"
 	"github.com/uber/cadence/common/service"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/common/types"
 )
 
diff --git a/service/frontend/dcRedirectionHandler.go b/service/frontend/dcRedirectionHandler.go
index 47107e9cc..d96ad6309 100644
--- a/service/frontend/dcRedirectionHandler.go
+++ b/service/frontend/dcRedirectionHandler.go
@@ -25,10 +25,10 @@ import (
 	"time"
 
 	"github.com/uber/cadence/common"
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/metrics"
 	"github.com/uber/cadence/common/resource"
-	"github.com/uber/cadence/common/service/config"
 	"github.com/uber/cadence/common/types"
 )
 
diff --git a/service/frontend/dcRedirectionPolicy.go b/service/frontend/dcRedirectionPolicy.go
index d2a2f38f0..cca79acda 100644
--- a/service/frontend/dcRedirectionPolicy.go
+++ b/service/frontend/dcRedirectionPolicy.go
@@ -29,7 +29,7 @@ import (
 	"github.com/uber/cadence/common"
 	"github.com/uber/cadence/common/cache"
 	"github.com/uber/cadence/common/cluster"
-	"github.com/uber/cadence/common/service/config"
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/common/types"
 )
 
diff --git a/service/frontend/service.go b/service/frontend/service.go
index 95bbd4df7..b8cf0144e 100644
--- a/service/frontend/service.go
+++ b/service/frontend/service.go
@@ -26,8 +26,10 @@ import (
 
 	"github.com/uber/cadence/common"
 	"github.com/uber/cadence/common/client"
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/common/definition"
 	"github.com/uber/cadence/common/domain"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/messaging"
 	"github.com/uber/cadence/common/persistence"
@@ -35,8 +37,6 @@ import (
 	espersistence "github.com/uber/cadence/common/persistence/elasticsearch"
 	"github.com/uber/cadence/common/resource"
 	"github.com/uber/cadence/common/service"
-	"github.com/uber/cadence/common/service/config"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 )
 
 // Config represents configuration for cadence-frontend service
diff --git a/service/history/config/config.go b/service/history/config/config.go
index e95e849bf..d5dcfe682 100644
--- a/service/history/config/config.go
+++ b/service/history/config/config.go
@@ -24,9 +24,9 @@ import (
 	"time"
 
 	"github.com/uber/cadence/common"
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/common/definition"
-	"github.com/uber/cadence/common/service/config"
-	"github.com/uber/cadence/common/service/dynamicconfig"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/task"
 )
 
diff --git a/service/history/queue/processor_base.go b/service/history/queue/processor_base.go
index e5ec7478a..83abe264f 100644
--- a/service/history/queue/processor_base.go
+++ b/service/history/queue/processor_base.go
@@ -26,11 +26,11 @@ import (
 	"time"
 
 	"github.com/uber/cadence/common"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/tag"
 	"github.com/uber/cadence/common/metrics"
 	"github.com/uber/cadence/common/quotas"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/service/history/shard"
 	"github.com/uber/cadence/service/history/task"
 )
diff --git a/service/history/queue/split_policy.go b/service/history/queue/split_policy.go
index a0b062f3f..83a1573db 100644
--- a/service/history/queue/split_policy.go
+++ b/service/history/queue/split_policy.go
@@ -24,10 +24,10 @@ import (
 	"fmt"
 	"math/rand"
 
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/tag"
 	"github.com/uber/cadence/common/metrics"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	t "github.com/uber/cadence/common/task"
 	"github.com/uber/cadence/service/history/task"
 )
diff --git a/service/history/queue/timer_queue_processor_base.go b/service/history/queue/timer_queue_processor_base.go
index b0a90780b..68178dfca 100644
--- a/service/history/queue/timer_queue_processor_base.go
+++ b/service/history/queue/timer_queue_processor_base.go
@@ -30,11 +30,11 @@ import (
 
 	"github.com/uber/cadence/common"
 	"github.com/uber/cadence/common/backoff"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/tag"
 	"github.com/uber/cadence/common/metrics"
 	"github.com/uber/cadence/common/persistence"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/service/history/config"
 	"github.com/uber/cadence/service/history/shard"
 	"github.com/uber/cadence/service/history/task"
diff --git a/service/history/queue/transfer_queue_processor_base.go b/service/history/queue/transfer_queue_processor_base.go
index adaf3fd48..0f3c6189d 100644
--- a/service/history/queue/transfer_queue_processor_base.go
+++ b/service/history/queue/transfer_queue_processor_base.go
@@ -27,11 +27,11 @@ import (
 
 	"github.com/uber/cadence/common"
 	"github.com/uber/cadence/common/backoff"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/tag"
 	"github.com/uber/cadence/common/metrics"
 	"github.com/uber/cadence/common/persistence"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/service/history/config"
 	"github.com/uber/cadence/service/history/shard"
 	"github.com/uber/cadence/service/history/task"
diff --git a/service/history/queue/transfer_queue_validator.go b/service/history/queue/transfer_queue_validator.go
index 702666e4f..48cda525a 100644
--- a/service/history/queue/transfer_queue_validator.go
+++ b/service/history/queue/transfer_queue_validator.go
@@ -27,11 +27,11 @@ import (
 	"time"
 
 	"github.com/uber/cadence/common/clock"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/tag"
 	"github.com/uber/cadence/common/metrics"
 	"github.com/uber/cadence/common/persistence"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/service/history/task"
 )
 
diff --git a/service/history/replication/task_ack_manager.go b/service/history/replication/task_ack_manager.go
index dca6964af..679f1137d 100644
--- a/service/history/replication/task_ack_manager.go
+++ b/service/history/replication/task_ack_manager.go
@@ -35,12 +35,12 @@ import (
 	"github.com/uber/cadence/common/backoff"
 	"github.com/uber/cadence/common/cache"
 	"github.com/uber/cadence/common/collection"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/tag"
 	"github.com/uber/cadence/common/metrics"
 	"github.com/uber/cadence/common/persistence"
 	"github.com/uber/cadence/common/quotas"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/common/types"
 	exec "github.com/uber/cadence/service/history/execution"
 	"github.com/uber/cadence/service/history/shard"
diff --git a/service/history/service.go b/service/history/service.go
index afe62ff9c..62a9251de 100644
--- a/service/history/service.go
+++ b/service/history/service.go
@@ -25,14 +25,14 @@ import (
 	"time"
 
 	"github.com/uber/cadence/common"
+	sconfig "github.com/uber/cadence/common/config"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/tag"
 	"github.com/uber/cadence/common/persistence"
 	persistenceClient "github.com/uber/cadence/common/persistence/client"
 	espersistence "github.com/uber/cadence/common/persistence/elasticsearch"
 	"github.com/uber/cadence/common/service"
-	sconfig "github.com/uber/cadence/common/service/config"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/service/history/config"
 	"github.com/uber/cadence/service/history/resource"
 )
diff --git a/service/history/task/processor.go b/service/history/task/processor.go
index 73d4dc7e0..40657018e 100644
--- a/service/history/task/processor.go
+++ b/service/history/task/processor.go
@@ -27,9 +27,9 @@ import (
 	"sync/atomic"
 
 	"github.com/uber/cadence/common"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/metrics"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/common/task"
 	"github.com/uber/cadence/service/history/config"
 	"github.com/uber/cadence/service/history/shard"
diff --git a/service/history/task/redispatcher.go b/service/history/task/redispatcher.go
index a9cb61c89..05065f4b2 100644
--- a/service/history/task/redispatcher.go
+++ b/service/history/task/redispatcher.go
@@ -27,10 +27,10 @@ import (
 
 	"github.com/uber/cadence/common"
 	"github.com/uber/cadence/common/backoff"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/tag"
 	"github.com/uber/cadence/common/metrics"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 )
 
 const (
diff --git a/service/history/task/task.go b/service/history/task/task.go
index b664eba28..3062cacda 100644
--- a/service/history/task/task.go
+++ b/service/history/task/task.go
@@ -28,11 +28,11 @@ import (
 	"github.com/uber/cadence/common"
 	"github.com/uber/cadence/common/cache"
 	"github.com/uber/cadence/common/clock"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/tag"
 	"github.com/uber/cadence/common/metrics"
 	"github.com/uber/cadence/common/persistence"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	ctask "github.com/uber/cadence/common/task"
 	"github.com/uber/cadence/common/types"
 	"github.com/uber/cadence/service/history/execution"
diff --git a/service/matching/config.go b/service/matching/config.go
index bf3990bc2..bf82c9f36 100644
--- a/service/matching/config.go
+++ b/service/matching/config.go
@@ -25,7 +25,7 @@ import (
 
 	"github.com/uber/cadence/common"
 	"github.com/uber/cadence/common/cache"
-	"github.com/uber/cadence/common/service/dynamicconfig"
+	"github.com/uber/cadence/common/dynamicconfig"
 )
 
 type (
diff --git a/service/matching/service.go b/service/matching/service.go
index 941d69550..785af094e 100644
--- a/service/matching/service.go
+++ b/service/matching/service.go
@@ -25,12 +25,12 @@ import (
 	"time"
 
 	"github.com/uber/cadence/common"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/persistence"
 	persistenceClient "github.com/uber/cadence/common/persistence/client"
 	"github.com/uber/cadence/common/resource"
 	"github.com/uber/cadence/common/service"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 )
 
 // Service represents the cadence-matching service
diff --git a/service/worker/archiver/client.go b/service/worker/archiver/client.go
index 0b727dab5..a8b557689 100644
--- a/service/worker/archiver/client.go
+++ b/service/worker/archiver/client.go
@@ -33,11 +33,11 @@ import (
 	"github.com/uber/cadence/common"
 	carchiver "github.com/uber/cadence/common/archiver"
 	"github.com/uber/cadence/common/archiver/provider"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/tag"
 	"github.com/uber/cadence/common/metrics"
 	"github.com/uber/cadence/common/quotas"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/common/types"
 )
 
diff --git a/service/worker/archiver/client_worker.go b/service/worker/archiver/client_worker.go
index c5dfbb3a1..abd0aae90 100644
--- a/service/worker/archiver/client_worker.go
+++ b/service/worker/archiver/client_worker.go
@@ -32,11 +32,11 @@ import (
 	"github.com/uber/cadence/common"
 	"github.com/uber/cadence/common/archiver/provider"
 	"github.com/uber/cadence/common/cache"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/tag"
 	"github.com/uber/cadence/common/metrics"
 	"github.com/uber/cadence/common/persistence"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 )
 
 type (
diff --git a/service/worker/batcher/batcher.go b/service/worker/batcher/batcher.go
index 7de7c8f34..8743fd46c 100644
--- a/service/worker/batcher/batcher.go
+++ b/service/worker/batcher/batcher.go
@@ -31,10 +31,10 @@ import (
 	"github.com/uber/cadence/client"
 	"github.com/uber/cadence/common"
 	"github.com/uber/cadence/common/cluster"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/tag"
 	"github.com/uber/cadence/common/metrics"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 )
 
 type (
diff --git a/service/worker/failovermanager/starter.go b/service/worker/failovermanager/starter.go
index 6e2861eae..c13b7f7f7 100644
--- a/service/worker/failovermanager/starter.go
+++ b/service/worker/failovermanager/starter.go
@@ -31,10 +31,10 @@ import (
 	"github.com/uber/cadence/client"
 	"github.com/uber/cadence/common"
 	"github.com/uber/cadence/common/cluster"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/tag"
 	"github.com/uber/cadence/common/metrics"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 )
 
 type (
diff --git a/service/worker/indexer/indexer.go b/service/worker/indexer/indexer.go
index 7b2527ffe..2e65e21f4 100644
--- a/service/worker/indexer/indexer.go
+++ b/service/worker/indexer/indexer.go
@@ -24,13 +24,13 @@ import (
 	"fmt"
 
 	"github.com/uber/cadence/common"
+	"github.com/uber/cadence/common/config"
+	"github.com/uber/cadence/common/dynamicconfig"
 	es "github.com/uber/cadence/common/elasticsearch"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/tag"
 	"github.com/uber/cadence/common/messaging"
 	"github.com/uber/cadence/common/metrics"
-	"github.com/uber/cadence/common/service/config"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 )
 
 type (
diff --git a/service/worker/scanner/executions/concrete_execution.go b/service/worker/scanner/executions/concrete_execution.go
index 60d524349..36fa5fda9 100644
--- a/service/worker/scanner/executions/concrete_execution.go
+++ b/service/worker/scanner/executions/concrete_execution.go
@@ -31,11 +31,11 @@ import (
 	"go.uber.org/cadence/workflow"
 
 	"github.com/uber/cadence/common/blobstore"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/pagination"
 	"github.com/uber/cadence/common/persistence"
 	"github.com/uber/cadence/common/reconciliation/invariant"
 	"github.com/uber/cadence/common/reconciliation/store"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/service/worker/scanner/shardscanner"
 )
 
diff --git a/service/worker/scanner/executions/current_execution.go b/service/worker/scanner/executions/current_execution.go
index c83e70973..ab9d43758 100644
--- a/service/worker/scanner/executions/current_execution.go
+++ b/service/worker/scanner/executions/current_execution.go
@@ -31,11 +31,11 @@ import (
 	"go.uber.org/cadence/workflow"
 
 	"github.com/uber/cadence/common/blobstore"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/pagination"
 	"github.com/uber/cadence/common/persistence"
 	"github.com/uber/cadence/common/reconciliation/invariant"
 	"github.com/uber/cadence/common/reconciliation/store"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/service/worker/scanner/shardscanner"
 )
 
diff --git a/service/worker/scanner/history/scavenger.go b/service/worker/scanner/history/scavenger.go
index 7bec19b02..4c46c730a 100644
--- a/service/worker/scanner/history/scavenger.go
+++ b/service/worker/scanner/history/scavenger.go
@@ -29,11 +29,11 @@ import (
 
 	"github.com/uber/cadence/client/history"
 	"github.com/uber/cadence/common"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/tag"
 	"github.com/uber/cadence/common/metrics"
 	p "github.com/uber/cadence/common/persistence"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/common/types"
 )
 
diff --git a/service/worker/scanner/scanner.go b/service/worker/scanner/scanner.go
index 06ef3436c..ce85b2fb9 100644
--- a/service/worker/scanner/scanner.go
+++ b/service/worker/scanner/scanner.go
@@ -36,10 +36,10 @@ import (
 	"github.com/uber/cadence/common"
 	"github.com/uber/cadence/common/backoff"
 	"github.com/uber/cadence/common/cluster"
+	"github.com/uber/cadence/common/config"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log/tag"
 	"github.com/uber/cadence/common/resource"
-	"github.com/uber/cadence/common/service/config"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/service/worker/scanner/shardscanner"
 )
 
diff --git a/service/worker/scanner/shardscanner/fixer.go b/service/worker/scanner/shardscanner/fixer.go
index 973df1769..c87b16ad4 100644
--- a/service/worker/scanner/shardscanner/fixer.go
+++ b/service/worker/scanner/shardscanner/fixer.go
@@ -30,10 +30,10 @@ import (
 
 	"github.com/uber/cadence/common/blobstore"
 	"github.com/uber/cadence/common/cache"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/reconciliation/entity"
 	"github.com/uber/cadence/common/reconciliation/invariant"
 	"github.com/uber/cadence/common/reconciliation/store"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 )
 
 // Fixer is used to fix entities in a shard. It is responsible for three things:
diff --git a/service/worker/scanner/shardscanner/types.go b/service/worker/scanner/shardscanner/types.go
index 04f22c855..ee83f3d1a 100644
--- a/service/worker/scanner/shardscanner/types.go
+++ b/service/worker/scanner/shardscanner/types.go
@@ -33,11 +33,11 @@ import (
 	"go.uber.org/cadence/client"
 	"go.uber.org/cadence/workflow"
 
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/metrics"
 	"github.com/uber/cadence/common/reconciliation/invariant"
 	"github.com/uber/cadence/common/reconciliation/store"
 	"github.com/uber/cadence/common/resource"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 )
 
 const (
diff --git a/service/worker/scanner/timers/timers.go b/service/worker/scanner/timers/timers.go
index a569e3ebb..9cc513045 100644
--- a/service/worker/scanner/timers/timers.go
+++ b/service/worker/scanner/timers/timers.go
@@ -28,13 +28,13 @@ import (
 	"time"
 
 	"github.com/uber/cadence/common/blobstore"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/pagination"
 	"github.com/uber/cadence/common/persistence"
 	"github.com/uber/cadence/common/reconciliation/entity"
 	"github.com/uber/cadence/common/reconciliation/fetcher"
 	"github.com/uber/cadence/common/reconciliation/invariant"
 	"github.com/uber/cadence/common/reconciliation/store"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/service/worker/scanner/shardscanner"
 
 	"go.uber.org/cadence/client"
diff --git a/service/worker/service.go b/service/worker/service.go
index 52bf3e8c6..c2f990adc 100644
--- a/service/worker/service.go
+++ b/service/worker/service.go
@@ -31,13 +31,13 @@ import (
 	"github.com/uber/cadence/common"
 	"github.com/uber/cadence/common/definition"
 	"github.com/uber/cadence/common/domain"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/tag"
 	"github.com/uber/cadence/common/persistence"
 	persistenceClient "github.com/uber/cadence/common/persistence/client"
 	"github.com/uber/cadence/common/resource"
 	"github.com/uber/cadence/common/service"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/common/types"
 	"github.com/uber/cadence/service/worker/archiver"
 	"github.com/uber/cadence/service/worker/batcher"
diff --git a/tools/cassandra/handler.go b/tools/cassandra/handler.go
index 2533e26ba..74aa53bfb 100644
--- a/tools/cassandra/handler.go
+++ b/tools/cassandra/handler.go
@@ -27,7 +27,7 @@ import (
 	"github.com/urfave/cli"
 
 	"github.com/uber/cadence/common/auth"
-	"github.com/uber/cadence/common/service/config"
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/schema/cassandra"
 	"github.com/uber/cadence/tools/common/schema"
 )
diff --git a/tools/cli/adminCommands.go b/tools/cli/adminCommands.go
index 5117b0c2d..a92642e6a 100644
--- a/tools/cli/adminCommands.go
+++ b/tools/cli/adminCommands.go
@@ -35,13 +35,13 @@ import (
 	"github.com/uber/cadence/common"
 	"github.com/uber/cadence/common/auth"
 	"github.com/uber/cadence/common/codec"
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/common/log/loggerimpl"
 	"github.com/uber/cadence/common/persistence"
 	cassp "github.com/uber/cadence/common/persistence/cassandra"
 	"github.com/uber/cadence/common/persistence/nosql/nosqlplugin/cassandra/gocql"
 	"github.com/uber/cadence/common/persistence/sql"
 	"github.com/uber/cadence/common/persistence/sql/sqlplugin"
-	"github.com/uber/cadence/common/service/config"
 	"github.com/uber/cadence/common/types"
 	"github.com/uber/cadence/common/types/mapper/thrift"
 )
diff --git a/tools/cli/adminDBCleanCommand.go b/tools/cli/adminDBCleanCommand.go
index bd267c7b2..afcf8ce52 100644
--- a/tools/cli/adminDBCleanCommand.go
+++ b/tools/cli/adminDBCleanCommand.go
@@ -31,13 +31,13 @@ import (
 	"github.com/urfave/cli"
 
 	"github.com/uber/cadence/common"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log/loggerimpl"
 	"github.com/uber/cadence/common/persistence"
 	"github.com/uber/cadence/common/persistence/cassandra"
 	"github.com/uber/cadence/common/reconciliation/entity"
 	"github.com/uber/cadence/common/reconciliation/invariant"
 	"github.com/uber/cadence/common/reconciliation/store"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/service/worker/scanner/executions"
 )
 
diff --git a/tools/cli/adminDBScanCommand.go b/tools/cli/adminDBScanCommand.go
index 0246c3ab9..1d26db656 100644
--- a/tools/cli/adminDBScanCommand.go
+++ b/tools/cli/adminDBScanCommand.go
@@ -34,6 +34,7 @@ import (
 
 	"github.com/uber/cadence/common"
 	"github.com/uber/cadence/common/collection"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/loggerimpl"
 	"github.com/uber/cadence/common/persistence"
@@ -44,7 +45,6 @@ import (
 	"github.com/uber/cadence/common/reconciliation/fetcher"
 	"github.com/uber/cadence/common/reconciliation/invariant"
 	"github.com/uber/cadence/common/reconciliation/store"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/service/worker/scanner/executions"
 )
 
diff --git a/tools/cli/adminKafkaCommands.go b/tools/cli/adminKafkaCommands.go
index ec54fe8ce..ed429eda1 100644
--- a/tools/cli/adminKafkaCommands.go
+++ b/tools/cli/adminKafkaCommands.go
@@ -42,11 +42,11 @@ import (
 	"github.com/uber/cadence/client/admin"
 	"github.com/uber/cadence/common"
 	"github.com/uber/cadence/common/auth"
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/common/log/loggerimpl"
 	"github.com/uber/cadence/common/persistence"
 	"github.com/uber/cadence/common/persistence/cassandra"
 	"github.com/uber/cadence/common/persistence/nosql/nosqlplugin/cassandra/gocql"
-	"github.com/uber/cadence/common/service/config"
 	"github.com/uber/cadence/common/types"
 	"github.com/uber/cadence/common/types/mapper/thrift"
 )
diff --git a/tools/cli/domainUtils.go b/tools/cli/domainUtils.go
index 7b27d8abd..684ce9aa1 100644
--- a/tools/cli/domainUtils.go
+++ b/tools/cli/domainUtils.go
@@ -33,15 +33,15 @@ import (
 	"github.com/uber/cadence/common/archiver/provider"
 	"github.com/uber/cadence/common/clock"
 	"github.com/uber/cadence/common/cluster"
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/common/domain"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/loggerimpl"
 	"github.com/uber/cadence/common/metrics"
 	"github.com/uber/cadence/common/mocks"
 	"github.com/uber/cadence/common/persistence"
 	"github.com/uber/cadence/common/persistence/client"
-	"github.com/uber/cadence/common/service/config"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 )
 
 const (
diff --git a/tools/sql/conn.go b/tools/sql/conn.go
index ca9318319..4f9e92e1b 100644
--- a/tools/sql/conn.go
+++ b/tools/sql/conn.go
@@ -21,9 +21,9 @@
 package sql
 
 import (
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/common/persistence/sql"
 	"github.com/uber/cadence/common/persistence/sql/sqlplugin"
-	"github.com/uber/cadence/common/service/config"
 	"github.com/uber/cadence/tools/common/schema"
 )
 
diff --git a/tools/sql/handler.go b/tools/sql/handler.go
index d7f0ce224..d32178533 100644
--- a/tools/sql/handler.go
+++ b/tools/sql/handler.go
@@ -29,9 +29,9 @@ import (
 	"github.com/urfave/cli"
 
 	"github.com/uber/cadence/common/auth"
+	"github.com/uber/cadence/common/config"
 	mysql_db "github.com/uber/cadence/common/persistence/sql/sqlplugin/mysql"
 	postgres_db "github.com/uber/cadence/common/persistence/sql/sqlplugin/postgres"
-	"github.com/uber/cadence/common/service/config"
 	"github.com/uber/cadence/schema/mysql"
 	"github.com/uber/cadence/schema/postgres"
 	"github.com/uber/cadence/tools/common/schema"


Test patch:
diff --git a/common/archiver/filestore/historyArchiver_test.go b/common/archiver/filestore/historyArchiver_test.go
index 1c6b49c60..4a7b5894c 100644
--- a/common/archiver/filestore/historyArchiver_test.go
+++ b/common/archiver/filestore/historyArchiver_test.go
@@ -36,8 +36,8 @@ import (
 
 	"github.com/uber/cadence/common"
 	"github.com/uber/cadence/common/archiver"
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/common/log/loggerimpl"
-	"github.com/uber/cadence/common/service/config"
 	"github.com/uber/cadence/common/types"
 	"github.com/uber/cadence/common/util"
 )
diff --git a/common/archiver/filestore/visibilityArchiver_test.go b/common/archiver/filestore/visibilityArchiver_test.go
index 78a387b49..10fea4314 100644
--- a/common/archiver/filestore/visibilityArchiver_test.go
+++ b/common/archiver/filestore/visibilityArchiver_test.go
@@ -37,8 +37,8 @@ import (
 
 	"github.com/uber/cadence/common"
 	"github.com/uber/cadence/common/archiver"
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/common/log/loggerimpl"
-	"github.com/uber/cadence/common/service/config"
 	"github.com/uber/cadence/common/types"
 	"github.com/uber/cadence/common/util"
 )
diff --git a/common/archiver/gcloud/connector/client_test.go b/common/archiver/gcloud/connector/client_test.go
index f93dbd7c5..ead5a5283 100644
--- a/common/archiver/gcloud/connector/client_test.go
+++ b/common/archiver/gcloud/connector/client_test.go
@@ -39,7 +39,7 @@ import (
 	"github.com/uber/cadence/common/archiver"
 	"github.com/uber/cadence/common/archiver/gcloud/connector"
 	"github.com/uber/cadence/common/archiver/gcloud/connector/mocks"
-	"github.com/uber/cadence/common/service/config"
+	"github.com/uber/cadence/common/config"
 )
 
 func (s *clientSuite) SetupTest() {
diff --git a/common/blobstore/filestore/client_test.go b/common/blobstore/filestore/client_test.go
index 459e9f2f7..7e186d7d9 100644
--- a/common/blobstore/filestore/client_test.go
+++ b/common/blobstore/filestore/client_test.go
@@ -32,7 +32,7 @@ import (
 	"github.com/stretchr/testify/suite"
 
 	"github.com/uber/cadence/common/blobstore"
-	"github.com/uber/cadence/common/service/config"
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/common/util"
 )
 
diff --git a/common/cache/domainCache_test.go b/common/cache/domainCache_test.go
index 8fafb091e..46100229a 100644
--- a/common/cache/domainCache_test.go
+++ b/common/cache/domainCache_test.go
@@ -34,12 +34,12 @@ import (
 	"github.com/uber/cadence/common"
 	"github.com/uber/cadence/common/clock"
 	"github.com/uber/cadence/common/cluster"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/loggerimpl"
 	"github.com/uber/cadence/common/metrics"
 	"github.com/uber/cadence/common/mocks"
 	"github.com/uber/cadence/common/persistence"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/common/types"
 )
 
diff --git a/common/cluster/metadataTest.go b/common/cluster/metadataTest.go
index 03ee9cd68..6ea293284 100644
--- a/common/cluster/metadataTest.go
+++ b/common/cluster/metadataTest.go
@@ -22,9 +22,9 @@ package cluster
 
 import (
 	"github.com/uber/cadence/common"
+	"github.com/uber/cadence/common/config"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log/loggerimpl"
-	"github.com/uber/cadence/common/service/config"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 )
 
 const (
diff --git a/common/service/config/config_test.go b/common/config/config_test.go
similarity index 97%
rename from common/service/config/config_test.go
rename to common/config/config_test.go
index 71b23de79..c2270cb5a 100644
--- a/common/service/config/config_test.go
+++ b/common/config/config_test.go
@@ -30,7 +30,7 @@ import (
 
 func TestToString(t *testing.T) {
 	var cfg Config
-	err := Load("", "../../../config", "", &cfg)
+	err := Load("", "../../config", "", &cfg)
 	assert.NoError(t, err)
 	assert.NotEmpty(t, cfg.String())
 }
diff --git a/common/domain/failover_watcher_test.go b/common/domain/failover_watcher_test.go
index ae40cb719..a5bb7a0a6 100644
--- a/common/domain/failover_watcher_test.go
+++ b/common/domain/failover_watcher_test.go
@@ -36,11 +36,11 @@ import (
 	"github.com/uber/cadence/common"
 	"github.com/uber/cadence/common/cache"
 	"github.com/uber/cadence/common/clock"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log/loggerimpl"
 	"github.com/uber/cadence/common/metrics"
 	"github.com/uber/cadence/common/mocks"
 	"github.com/uber/cadence/common/persistence"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 )
 
 type (
diff --git a/common/domain/handler_GlobalDomainDisabled_test.go b/common/domain/handler_GlobalDomainDisabled_test.go
index 28f8253bd..30fb90a14 100644
--- a/common/domain/handler_GlobalDomainDisabled_test.go
+++ b/common/domain/handler_GlobalDomainDisabled_test.go
@@ -35,12 +35,12 @@ import (
 	"github.com/uber/cadence/common/archiver/provider"
 	"github.com/uber/cadence/common/clock"
 	"github.com/uber/cadence/common/cluster"
+	"github.com/uber/cadence/common/config"
+	dc "github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log/loggerimpl"
 	"github.com/uber/cadence/common/mocks"
 	"github.com/uber/cadence/common/persistence"
 	persistencetests "github.com/uber/cadence/common/persistence/persistence-tests"
-	"github.com/uber/cadence/common/service/config"
-	dc "github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/common/types"
 )
 
diff --git a/common/domain/handler_GlobalDomainEnabled_MasterCluster_test.go b/common/domain/handler_GlobalDomainEnabled_MasterCluster_test.go
index eca2b1ae1..f6f58f903 100644
--- a/common/domain/handler_GlobalDomainEnabled_MasterCluster_test.go
+++ b/common/domain/handler_GlobalDomainEnabled_MasterCluster_test.go
@@ -36,12 +36,12 @@ import (
 	"github.com/uber/cadence/common/archiver/provider"
 	"github.com/uber/cadence/common/clock"
 	"github.com/uber/cadence/common/cluster"
+	"github.com/uber/cadence/common/config"
+	dc "github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log/loggerimpl"
 	"github.com/uber/cadence/common/mocks"
 	"github.com/uber/cadence/common/persistence"
 	persistencetests "github.com/uber/cadence/common/persistence/persistence-tests"
-	"github.com/uber/cadence/common/service/config"
-	dc "github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/common/types"
 )
 
diff --git a/common/domain/handler_GlobalDomainEnabled_NotMasterCluster_test.go b/common/domain/handler_GlobalDomainEnabled_NotMasterCluster_test.go
index 810f04dd0..f5c19038b 100644
--- a/common/domain/handler_GlobalDomainEnabled_NotMasterCluster_test.go
+++ b/common/domain/handler_GlobalDomainEnabled_NotMasterCluster_test.go
@@ -36,12 +36,12 @@ import (
 	"github.com/uber/cadence/common/archiver/provider"
 	"github.com/uber/cadence/common/clock"
 	"github.com/uber/cadence/common/cluster"
+	"github.com/uber/cadence/common/config"
+	dc "github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log/loggerimpl"
 	"github.com/uber/cadence/common/mocks"
 	"github.com/uber/cadence/common/persistence"
 	persistencetests "github.com/uber/cadence/common/persistence/persistence-tests"
-	"github.com/uber/cadence/common/service/config"
-	dc "github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/common/types"
 )
 
diff --git a/common/domain/handler_test.go b/common/domain/handler_test.go
index 6b9a7bdad..5b7725806 100644
--- a/common/domain/handler_test.go
+++ b/common/domain/handler_test.go
@@ -37,12 +37,12 @@ import (
 	"github.com/uber/cadence/common/archiver/provider"
 	"github.com/uber/cadence/common/clock"
 	"github.com/uber/cadence/common/cluster"
+	"github.com/uber/cadence/common/config"
+	dc "github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log/loggerimpl"
 	"github.com/uber/cadence/common/mocks"
 	"github.com/uber/cadence/common/persistence"
 	persistencetests "github.com/uber/cadence/common/persistence/persistence-tests"
-	"github.com/uber/cadence/common/service/config"
-	dc "github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/common/types"
 )
 
diff --git a/common/elasticsearch/validator/queryValidator_test.go b/common/elasticsearch/validator/queryValidator_test.go
index eaf766efc..2ee369482 100644
--- a/common/elasticsearch/validator/queryValidator_test.go
+++ b/common/elasticsearch/validator/queryValidator_test.go
@@ -26,7 +26,7 @@ import (
 	"github.com/stretchr/testify/assert"
 
 	"github.com/uber/cadence/common/definition"
-	"github.com/uber/cadence/common/service/dynamicconfig"
+	"github.com/uber/cadence/common/dynamicconfig"
 )
 
 func TestValidateQuery(t *testing.T) {
diff --git a/common/elasticsearch/validator/searchAttrValidator_test.go b/common/elasticsearch/validator/searchAttrValidator_test.go
index 0ecd1af46..bff0f7d03 100644
--- a/common/elasticsearch/validator/searchAttrValidator_test.go
+++ b/common/elasticsearch/validator/searchAttrValidator_test.go
@@ -26,8 +26,8 @@ import (
 	"github.com/stretchr/testify/suite"
 
 	"github.com/uber/cadence/common/definition"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/common/types"
 )
 
diff --git a/common/log/loggerimpl/logger_test.go b/common/log/loggerimpl/logger_test.go
index 00794ea93..e6734088d 100644
--- a/common/log/loggerimpl/logger_test.go
+++ b/common/log/loggerimpl/logger_test.go
@@ -32,8 +32,8 @@ import (
 	"github.com/stretchr/testify/assert"
 	"go.uber.org/zap"
 
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log/tag"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 )
 
 func TestDefaultLogger(t *testing.T) {
diff --git a/common/persistence/cassandra/cassandraPersistenceTest.go b/common/persistence/cassandra/cassandraPersistenceTest.go
index 05abb0a85..e57d357dd 100644
--- a/common/persistence/cassandra/cassandraPersistenceTest.go
+++ b/common/persistence/cassandra/cassandraPersistenceTest.go
@@ -28,9 +28,9 @@ import (
 	log "github.com/sirupsen/logrus"
 
 	"github.com/uber/cadence/common"
+	"github.com/uber/cadence/common/config"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/persistence/nosql/nosqlplugin/cassandra/gocql"
-	"github.com/uber/cadence/common/service/config"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/environment"
 )
 
diff --git a/common/persistence/elasticsearch/esVisibilityStore_test.go b/common/persistence/elasticsearch/esVisibilityStore_test.go
index 4f721260e..43d36dac3 100644
--- a/common/persistence/elasticsearch/esVisibilityStore_test.go
+++ b/common/persistence/elasticsearch/esVisibilityStore_test.go
@@ -37,14 +37,14 @@ import (
 	"github.com/uber/cadence/.gen/go/indexer"
 	workflow "github.com/uber/cadence/.gen/go/shared"
 	"github.com/uber/cadence/common"
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/common/definition"
+	"github.com/uber/cadence/common/dynamicconfig"
 	es "github.com/uber/cadence/common/elasticsearch"
 	esMocks "github.com/uber/cadence/common/elasticsearch/mocks"
 	"github.com/uber/cadence/common/log/loggerimpl"
 	"github.com/uber/cadence/common/mocks"
 	p "github.com/uber/cadence/common/persistence"
-	"github.com/uber/cadence/common/service/config"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/common/types"
 	"github.com/uber/cadence/common/types/mapper/thrift"
 )
diff --git a/common/persistence/persistence-tests/persistenceTestBase.go b/common/persistence/persistence-tests/persistenceTestBase.go
index 89a10e775..4305fd3a8 100644
--- a/common/persistence/persistence-tests/persistenceTestBase.go
+++ b/common/persistence/persistence-tests/persistenceTestBase.go
@@ -36,6 +36,7 @@ import (
 	"github.com/uber/cadence/common"
 	"github.com/uber/cadence/common/backoff"
 	"github.com/uber/cadence/common/cluster"
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/loggerimpl"
 	"github.com/uber/cadence/common/log/tag"
@@ -46,7 +47,6 @@ import (
 	"github.com/uber/cadence/common/persistence/client"
 	"github.com/uber/cadence/common/persistence/sql"
 	"github.com/uber/cadence/common/service"
-	"github.com/uber/cadence/common/service/config"
 	"github.com/uber/cadence/common/types"
 )
 
diff --git a/common/persistence/persistence-tests/visibilitySamplingClient_test.go b/common/persistence/persistence-tests/visibilitySamplingClient_test.go
index 4da615511..dd3a3ead9 100644
--- a/common/persistence/persistence-tests/visibilitySamplingClient_test.go
+++ b/common/persistence/persistence-tests/visibilitySamplingClient_test.go
@@ -29,13 +29,13 @@ import (
 	"github.com/stretchr/testify/require"
 	"github.com/stretchr/testify/suite"
 
+	c "github.com/uber/cadence/common/config"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log/loggerimpl"
 	"github.com/uber/cadence/common/metrics"
 	mmocks "github.com/uber/cadence/common/metrics/mocks"
 	"github.com/uber/cadence/common/mocks"
 	p "github.com/uber/cadence/common/persistence"
-	c "github.com/uber/cadence/common/service/config"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/common/types"
 )
 
diff --git a/common/persistence/sql/sqlPersistenceTest.go b/common/persistence/sql/sqlPersistenceTest.go
index fcaf5e05c..1b63d58b0 100644
--- a/common/persistence/sql/sqlPersistenceTest.go
+++ b/common/persistence/sql/sqlPersistenceTest.go
@@ -29,8 +29,8 @@ import (
 	log "github.com/sirupsen/logrus"
 
 	"github.com/uber/cadence/common"
-	"github.com/uber/cadence/common/service/config"
-	"github.com/uber/cadence/common/service/dynamicconfig"
+	"github.com/uber/cadence/common/config"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/environment"
 )
 
diff --git a/common/persistence/sql/sqlplugin/mysql/dsn_test.go b/common/persistence/sql/sqlplugin/mysql/dsn_test.go
index 54ed05547..98e626df8 100644
--- a/common/persistence/sql/sqlplugin/mysql/dsn_test.go
+++ b/common/persistence/sql/sqlplugin/mysql/dsn_test.go
@@ -27,7 +27,7 @@ import (
 
 	"github.com/stretchr/testify/suite"
 
-	"github.com/uber/cadence/common/service/config"
+	"github.com/uber/cadence/common/config"
 )
 
 type StoreTestSuite struct {
diff --git a/common/reconciliation/store/writerIterator_test.go b/common/reconciliation/store/writerIterator_test.go
index 73763f518..69186cd65 100644
--- a/common/reconciliation/store/writerIterator_test.go
+++ b/common/reconciliation/store/writerIterator_test.go
@@ -36,12 +36,12 @@ import (
 
 	"github.com/uber/cadence/common"
 	"github.com/uber/cadence/common/blobstore/filestore"
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/common/mocks"
 	"github.com/uber/cadence/common/pagination"
 	"github.com/uber/cadence/common/persistence"
 	"github.com/uber/cadence/common/reconciliation/entity"
 	"github.com/uber/cadence/common/reconciliation/fetcher"
-	"github.com/uber/cadence/common/service/config"
 )
 
 var (
diff --git a/common/task/fifoTaskScheduler_test.go b/common/task/fifoTaskScheduler_test.go
index f7b52c314..be8e7a34a 100644
--- a/common/task/fifoTaskScheduler_test.go
+++ b/common/task/fifoTaskScheduler_test.go
@@ -31,9 +31,9 @@ import (
 	"github.com/uber-go/tally"
 
 	"github.com/uber/cadence/common/backoff"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log/loggerimpl"
 	"github.com/uber/cadence/common/metrics"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 )
 
 type (
diff --git a/common/task/parallelTaskProcessor_test.go b/common/task/parallelTaskProcessor_test.go
index d9fb19525..f861d8564 100644
--- a/common/task/parallelTaskProcessor_test.go
+++ b/common/task/parallelTaskProcessor_test.go
@@ -34,9 +34,9 @@ import (
 
 	"github.com/uber/cadence/common"
 	"github.com/uber/cadence/common/backoff"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log/loggerimpl"
 	"github.com/uber/cadence/common/metrics"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 )
 
 type (
diff --git a/common/task/weightedRoundRobinTaskScheduler_test.go b/common/task/weightedRoundRobinTaskScheduler_test.go
index 4706fbed4..97b67ba3c 100644
--- a/common/task/weightedRoundRobinTaskScheduler_test.go
+++ b/common/task/weightedRoundRobinTaskScheduler_test.go
@@ -35,9 +35,9 @@ import (
 
 	"github.com/uber/cadence/common"
 	"github.com/uber/cadence/common/backoff"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log/loggerimpl"
 	"github.com/uber/cadence/common/metrics"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 )
 
 type (
diff --git a/common/tokenbucket/tb_test.go b/common/tokenbucket/tb_test.go
index b68f36a05..448d59e22 100644
--- a/common/tokenbucket/tb_test.go
+++ b/common/tokenbucket/tb_test.go
@@ -27,7 +27,7 @@ import (
 	"github.com/stretchr/testify/require"
 	"github.com/stretchr/testify/suite"
 
-	"github.com/uber/cadence/common/service/dynamicconfig"
+	"github.com/uber/cadence/common/dynamicconfig"
 )
 
 type (
diff --git a/host/testcluster.go b/host/testcluster.go
index 283b59e99..d477bf4d2 100644
--- a/host/testcluster.go
+++ b/host/testcluster.go
@@ -35,7 +35,9 @@ import (
 	"github.com/uber/cadence/common/archiver/provider"
 	"github.com/uber/cadence/common/clock"
 	"github.com/uber/cadence/common/cluster"
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/common/domain"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/elasticsearch"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/tag"
@@ -49,8 +51,6 @@ import (
 	"github.com/uber/cadence/common/persistence/sql"
 	"github.com/uber/cadence/common/persistence/sql/sqlplugin/mysql"
 	"github.com/uber/cadence/common/persistence/sql/sqlplugin/postgres"
-	"github.com/uber/cadence/common/service/config"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 )
 
 type (
diff --git a/service/frontend/adminHandler_test.go b/service/frontend/adminHandler_test.go
index 05e0807c0..ad2e1b38d 100644
--- a/service/frontend/adminHandler_test.go
+++ b/service/frontend/adminHandler_test.go
@@ -35,15 +35,15 @@ import (
 	"github.com/uber/cadence/client/history"
 	"github.com/uber/cadence/common"
 	"github.com/uber/cadence/common/cache"
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/common/definition"
+	"github.com/uber/cadence/common/dynamicconfig"
 	esmock "github.com/uber/cadence/common/elasticsearch/mocks"
 	"github.com/uber/cadence/common/metrics"
 	"github.com/uber/cadence/common/mocks"
 	"github.com/uber/cadence/common/persistence"
 	"github.com/uber/cadence/common/resource"
 	"github.com/uber/cadence/common/service"
-	"github.com/uber/cadence/common/service/config"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/common/types"
 )
 
diff --git a/service/frontend/dcRedirectionHandler_test.go b/service/frontend/dcRedirectionHandler_test.go
index 140772b62..2df5395e1 100644
--- a/service/frontend/dcRedirectionHandler_test.go
+++ b/service/frontend/dcRedirectionHandler_test.go
@@ -33,10 +33,10 @@ import (
 	"github.com/uber/cadence/common"
 	"github.com/uber/cadence/common/client"
 	"github.com/uber/cadence/common/cluster"
+	"github.com/uber/cadence/common/config"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/metrics"
 	"github.com/uber/cadence/common/resource"
-	"github.com/uber/cadence/common/service/config"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/common/types"
 )
 
diff --git a/service/frontend/dcRedirectionPolicy_test.go b/service/frontend/dcRedirectionPolicy_test.go
index 621cc8a88..27c6b9259 100644
--- a/service/frontend/dcRedirectionPolicy_test.go
+++ b/service/frontend/dcRedirectionPolicy_test.go
@@ -31,10 +31,10 @@ import (
 
 	"github.com/uber/cadence/common/cache"
 	"github.com/uber/cadence/common/cluster"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log/loggerimpl"
 	"github.com/uber/cadence/common/mocks"
 	"github.com/uber/cadence/common/persistence"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/common/types"
 )
 
diff --git a/service/frontend/workflowHandler_test.go b/service/frontend/workflowHandler_test.go
index b0600e159..56599483c 100644
--- a/service/frontend/workflowHandler_test.go
+++ b/service/frontend/workflowHandler_test.go
@@ -42,12 +42,12 @@ import (
 	"github.com/uber/cadence/common/client"
 	"github.com/uber/cadence/common/cluster"
 	"github.com/uber/cadence/common/domain"
+	dc "github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/messaging"
 	"github.com/uber/cadence/common/metrics"
 	"github.com/uber/cadence/common/mocks"
 	"github.com/uber/cadence/common/persistence"
 	"github.com/uber/cadence/common/resource"
-	dc "github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/common/types"
 )
 
diff --git a/service/history/decision/checker_test.go b/service/history/decision/checker_test.go
index 655b83ea9..7a7fb66f8 100644
--- a/service/history/decision/checker_test.go
+++ b/service/history/decision/checker_test.go
@@ -32,9 +32,9 @@ import (
 	"github.com/uber/cadence/common/cache"
 	"github.com/uber/cadence/common/cluster"
 	"github.com/uber/cadence/common/definition"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/persistence"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/common/types"
 	"github.com/uber/cadence/service/history/config"
 	"github.com/uber/cadence/service/history/constants"
diff --git a/service/history/execution/cache_test.go b/service/history/execution/cache_test.go
index e81c7ec80..168fdbf10 100644
--- a/service/history/execution/cache_test.go
+++ b/service/history/execution/cache_test.go
@@ -30,8 +30,8 @@ import (
 	"github.com/stretchr/testify/require"
 	"github.com/stretchr/testify/suite"
 
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/persistence"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/common/types"
 	"github.com/uber/cadence/service/history/config"
 	"github.com/uber/cadence/service/history/shard"
diff --git a/service/history/execution/mutable_state_builder_test.go b/service/history/execution/mutable_state_builder_test.go
index be99f2d80..cdcef70ba 100644
--- a/service/history/execution/mutable_state_builder_test.go
+++ b/service/history/execution/mutable_state_builder_test.go
@@ -35,9 +35,9 @@ import (
 	"github.com/uber/cadence/common/cache"
 	"github.com/uber/cadence/common/checksum"
 	"github.com/uber/cadence/common/definition"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/persistence"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/common/types"
 	"github.com/uber/cadence/service/history/config"
 	"github.com/uber/cadence/service/history/constants"
diff --git a/service/history/failover/coordinator_test.go b/service/history/failover/coordinator_test.go
index 8cab404f0..d5562792f 100644
--- a/service/history/failover/coordinator_test.go
+++ b/service/history/failover/coordinator_test.go
@@ -36,11 +36,11 @@ import (
 
 	"github.com/uber/cadence/client/history"
 	"github.com/uber/cadence/common"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/metrics"
 	mmocks "github.com/uber/cadence/common/mocks"
 	"github.com/uber/cadence/common/persistence"
 	"github.com/uber/cadence/common/resource"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/common/types"
 	"github.com/uber/cadence/service/history/config"
 )
diff --git a/service/history/failover/marker_notifier_test.go b/service/history/failover/marker_notifier_test.go
index 2cc7e943d..701acb086 100644
--- a/service/history/failover/marker_notifier_test.go
+++ b/service/history/failover/marker_notifier_test.go
@@ -35,8 +35,8 @@ import (
 	"github.com/uber/cadence/common"
 	"github.com/uber/cadence/common/cache"
 	"github.com/uber/cadence/common/cluster"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/persistence"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/common/types"
 	"github.com/uber/cadence/service/history/config"
 	"github.com/uber/cadence/service/history/shard"
diff --git a/service/history/historyEngine_test.go b/service/history/historyEngine_test.go
index ffa8c5cdf..4a526078c 100644
--- a/service/history/historyEngine_test.go
+++ b/service/history/historyEngine_test.go
@@ -43,11 +43,11 @@ import (
 	cc "github.com/uber/cadence/common/client"
 	"github.com/uber/cadence/common/clock"
 	"github.com/uber/cadence/common/cluster"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log/loggerimpl"
 	"github.com/uber/cadence/common/mocks"
 	"github.com/uber/cadence/common/persistence"
 	p "github.com/uber/cadence/common/persistence"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/common/types"
 	"github.com/uber/cadence/common/types/mapper/thrift"
 	"github.com/uber/cadence/service/history/config"
diff --git a/service/history/queue/processor_base_test.go b/service/history/queue/processor_base_test.go
index a363fd71f..69cfec925 100644
--- a/service/history/queue/processor_base_test.go
+++ b/service/history/queue/processor_base_test.go
@@ -31,11 +31,11 @@ import (
 	"github.com/uber-go/tally"
 
 	"github.com/uber/cadence/common/collection"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/loggerimpl"
 	"github.com/uber/cadence/common/metrics"
 	"github.com/uber/cadence/common/persistence"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/common/types"
 	"github.com/uber/cadence/service/history/config"
 	"github.com/uber/cadence/service/history/shard"
diff --git a/service/history/queue/split_policy_test.go b/service/history/queue/split_policy_test.go
index 651516519..63e7480ae 100644
--- a/service/history/queue/split_policy_test.go
+++ b/service/history/queue/split_policy_test.go
@@ -29,10 +29,10 @@ import (
 	"github.com/stretchr/testify/suite"
 	"github.com/uber-go/tally"
 
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/loggerimpl"
 	"github.com/uber/cadence/common/metrics"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	t "github.com/uber/cadence/common/task"
 	"github.com/uber/cadence/service/history/task"
 )
diff --git a/service/history/queue/transfer_queue_validator_test.go b/service/history/queue/transfer_queue_validator_test.go
index dbb5564d8..9ce2f70bd 100644
--- a/service/history/queue/transfer_queue_validator_test.go
+++ b/service/history/queue/transfer_queue_validator_test.go
@@ -30,11 +30,11 @@ import (
 	"github.com/stretchr/testify/suite"
 
 	"github.com/uber/cadence/common/clock"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/metrics"
 	"github.com/uber/cadence/common/metrics/mocks"
 	"github.com/uber/cadence/common/persistence"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/service/history/config"
 	"github.com/uber/cadence/service/history/shard"
 	"github.com/uber/cadence/service/history/task"
diff --git a/service/history/replication/task_processor_test.go b/service/history/replication/task_processor_test.go
index 04d2ce8fe..d617949ea 100644
--- a/service/history/replication/task_processor_test.go
+++ b/service/history/replication/task_processor_test.go
@@ -36,11 +36,11 @@ import (
 	"github.com/uber/cadence/common"
 	"github.com/uber/cadence/common/cache"
 	"github.com/uber/cadence/common/cluster"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/metrics"
 	"github.com/uber/cadence/common/mocks"
 	"github.com/uber/cadence/common/persistence"
 	"github.com/uber/cadence/common/quotas"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/common/types"
 	"github.com/uber/cadence/service/history/config"
 	"github.com/uber/cadence/service/history/engine"
diff --git a/service/history/shard/controller_test.go b/service/history/shard/controller_test.go
index 4cb7f163c..7ea99ffa7 100644
--- a/service/history/shard/controller_test.go
+++ b/service/history/shard/controller_test.go
@@ -33,13 +33,13 @@ import (
 	"github.com/stretchr/testify/suite"
 
 	"github.com/uber/cadence/common/cluster"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/tag"
 	"github.com/uber/cadence/common/membership"
 	"github.com/uber/cadence/common/metrics"
 	mmocks "github.com/uber/cadence/common/mocks"
 	"github.com/uber/cadence/common/persistence"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/service/history/config"
 	"github.com/uber/cadence/service/history/engine"
 	"github.com/uber/cadence/service/history/resource"
diff --git a/service/history/task/priority_assigner_test.go b/service/history/task/priority_assigner_test.go
index 6af28f293..f8215a630 100644
--- a/service/history/task/priority_assigner_test.go
+++ b/service/history/task/priority_assigner_test.go
@@ -31,9 +31,9 @@ import (
 
 	"github.com/uber/cadence/common/cache"
 	"github.com/uber/cadence/common/cluster"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/metrics"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/common/task"
 	"github.com/uber/cadence/common/types"
 	"github.com/uber/cadence/service/history/config"
diff --git a/service/history/task/processor_test.go b/service/history/task/processor_test.go
index 1a293afd2..88808d16b 100644
--- a/service/history/task/processor_test.go
+++ b/service/history/task/processor_test.go
@@ -29,11 +29,11 @@ import (
 	"github.com/stretchr/testify/suite"
 	"github.com/uber-go/tally"
 
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/loggerimpl"
 	"github.com/uber/cadence/common/metrics"
 	"github.com/uber/cadence/common/persistence"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/common/task"
 	"github.com/uber/cadence/service/history/config"
 	"github.com/uber/cadence/service/history/shard"
diff --git a/service/history/task/redispatcher_test.go b/service/history/task/redispatcher_test.go
index 5ef4f9ae9..5643052cb 100644
--- a/service/history/task/redispatcher_test.go
+++ b/service/history/task/redispatcher_test.go
@@ -31,10 +31,10 @@ import (
 	"github.com/stretchr/testify/suite"
 	"github.com/uber-go/tally"
 
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/loggerimpl"
 	"github.com/uber/cadence/common/metrics"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 )
 
 type (
diff --git a/service/history/task/task_test.go b/service/history/task/task_test.go
index 1243da6ec..a807000d7 100644
--- a/service/history/task/task_test.go
+++ b/service/history/task/task_test.go
@@ -31,10 +31,10 @@ import (
 
 	"github.com/uber/cadence/common/cache"
 	"github.com/uber/cadence/common/clock"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/loggerimpl"
 	"github.com/uber/cadence/common/persistence"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	t "github.com/uber/cadence/common/task"
 	"github.com/uber/cadence/common/types"
 	"github.com/uber/cadence/service/history/config"
diff --git a/service/history/task/transfer_active_task_executor_test.go b/service/history/task/transfer_active_task_executor_test.go
index b5fddd2fe..bfe86c5d9 100644
--- a/service/history/task/transfer_active_task_executor_test.go
+++ b/service/history/task/transfer_active_task_executor_test.go
@@ -41,11 +41,11 @@ import (
 	"github.com/uber/cadence/common/cache"
 	"github.com/uber/cadence/common/clock"
 	"github.com/uber/cadence/common/cluster"
+	dc "github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/mocks"
 	"github.com/uber/cadence/common/persistence"
 	p "github.com/uber/cadence/common/persistence"
-	dc "github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/common/types"
 	"github.com/uber/cadence/service/history/config"
 	"github.com/uber/cadence/service/history/constants"
diff --git a/service/matching/matcher_test.go b/service/matching/matcher_test.go
index b4018f699..7446299eb 100644
--- a/service/matching/matcher_test.go
+++ b/service/matching/matcher_test.go
@@ -33,9 +33,9 @@ import (
 	"github.com/uber/cadence/client/matching"
 	"github.com/uber/cadence/common"
 	"github.com/uber/cadence/common/cache"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/metrics"
 	"github.com/uber/cadence/common/persistence"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/common/types"
 )
 
diff --git a/service/matching/matchingEngine_test.go b/service/matching/matchingEngine_test.go
index 72040a0f1..61be8a199 100644
--- a/service/matching/matchingEngine_test.go
+++ b/service/matching/matchingEngine_test.go
@@ -35,6 +35,7 @@ import (
 	"github.com/uber/cadence/client/history"
 	"github.com/uber/cadence/common"
 	"github.com/uber/cadence/common/cache"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/loggerimpl"
 	"github.com/uber/cadence/common/log/tag"
@@ -42,7 +43,6 @@ import (
 	"github.com/uber/cadence/common/mocks"
 	"github.com/uber/cadence/common/persistence"
 	"github.com/uber/cadence/common/quotas"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/common/types"
 
 	"github.com/davecgh/go-spew/spew"
diff --git a/service/matching/taskListManager_test.go b/service/matching/taskListManager_test.go
index 1bc2f767c..67f8a6620 100644
--- a/service/matching/taskListManager_test.go
+++ b/service/matching/taskListManager_test.go
@@ -33,10 +33,10 @@ import (
 	"github.com/stretchr/testify/require"
 
 	"github.com/uber/cadence/common/cache"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log/loggerimpl"
 	"github.com/uber/cadence/common/log/tag"
 	"github.com/uber/cadence/common/persistence"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/common/types"
 )
 
diff --git a/service/worker/archiver/client_test.go b/service/worker/archiver/client_test.go
index 36827482a..56ee4f4de 100644
--- a/service/worker/archiver/client_test.go
+++ b/service/worker/archiver/client_test.go
@@ -32,10 +32,10 @@ import (
 
 	carchiver "github.com/uber/cadence/common/archiver"
 	"github.com/uber/cadence/common/archiver/provider"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/metrics"
 	mmocks "github.com/uber/cadence/common/metrics/mocks"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 )
 
 type clientSuite struct {
diff --git a/service/worker/archiver/workflow_test.go b/service/worker/archiver/workflow_test.go
index fdf4fe023..f063f9181 100644
--- a/service/worker/archiver/workflow_test.go
+++ b/service/worker/archiver/workflow_test.go
@@ -30,11 +30,11 @@ import (
 	"go.uber.org/cadence/workflow"
 	"go.uber.org/zap"
 
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/loggerimpl"
 	"github.com/uber/cadence/common/metrics"
 	mmocks "github.com/uber/cadence/common/metrics/mocks"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 )
 
 var (
diff --git a/service/worker/indexer/esProcessor_test.go b/service/worker/indexer/esProcessor_test.go
index db6a79155..af611b8f7 100644
--- a/service/worker/indexer/esProcessor_test.go
+++ b/service/worker/indexer/esProcessor_test.go
@@ -34,13 +34,13 @@ import (
 	"github.com/uber/cadence/common"
 	"github.com/uber/cadence/common/codec"
 	"github.com/uber/cadence/common/collection"
+	"github.com/uber/cadence/common/dynamicconfig"
 	es "github.com/uber/cadence/common/elasticsearch"
 	esMocks "github.com/uber/cadence/common/elasticsearch/mocks"
 	"github.com/uber/cadence/common/log/loggerimpl"
 	msgMocks "github.com/uber/cadence/common/messaging/mocks"
 	"github.com/uber/cadence/common/metrics"
 	mmocks "github.com/uber/cadence/common/metrics/mocks"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 )
 
 type esProcessorSuite struct {
diff --git a/service/worker/scanner/history/scavenger_test.go b/service/worker/scanner/history/scavenger_test.go
index 5a0fa8d50..94e315a67 100644
--- a/service/worker/scanner/history/scavenger_test.go
+++ b/service/worker/scanner/history/scavenger_test.go
@@ -35,12 +35,12 @@ import (
 	"github.com/uber/cadence/client/history"
 	"github.com/uber/cadence/common"
 	"github.com/uber/cadence/common/domain"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/log/loggerimpl"
 	"github.com/uber/cadence/common/metrics"
 	"github.com/uber/cadence/common/mocks"
 	p "github.com/uber/cadence/common/persistence"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/common/types"
 )
 
diff --git a/service/worker/scanner/shardscanner/activities_test.go b/service/worker/scanner/shardscanner/activities_test.go
index 772f5d7a1..072de901f 100644
--- a/service/worker/scanner/shardscanner/activities_test.go
+++ b/service/worker/scanner/shardscanner/activities_test.go
@@ -40,6 +40,7 @@ import (
 	"github.com/uber/cadence/common"
 	"github.com/uber/cadence/common/blobstore"
 	"github.com/uber/cadence/common/cache"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/metrics"
 	"github.com/uber/cadence/common/pagination"
 	"github.com/uber/cadence/common/persistence"
@@ -47,7 +48,6 @@ import (
 	"github.com/uber/cadence/common/reconciliation/invariant"
 	"github.com/uber/cadence/common/reconciliation/store"
 	"github.com/uber/cadence/common/resource"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 )
 
 const testWorkflowName = "default-test-workflow-type-name"
diff --git a/service/worker/scanner/shardscanner/fixer_test.go b/service/worker/scanner/shardscanner/fixer_test.go
index e188f6290..0347309a5 100644
--- a/service/worker/scanner/shardscanner/fixer_test.go
+++ b/service/worker/scanner/shardscanner/fixer_test.go
@@ -32,11 +32,11 @@ import (
 	"github.com/stretchr/testify/suite"
 
 	"github.com/uber/cadence/common/cache"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/persistence"
 	"github.com/uber/cadence/common/reconciliation/entity"
 	"github.com/uber/cadence/common/reconciliation/invariant"
 	"github.com/uber/cadence/common/reconciliation/store"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 )
 
 type FixerSuite struct {
diff --git a/service/worker/scanner/timers/timers_test.go b/service/worker/scanner/timers/timers_test.go
index 6e695daec..13feb23f1 100644
--- a/service/worker/scanner/timers/timers_test.go
+++ b/service/worker/scanner/timers/timers_test.go
@@ -33,10 +33,10 @@ import (
 	"go.uber.org/cadence/workflow"
 
 	"github.com/uber/cadence/common"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/common/log"
 	"github.com/uber/cadence/common/reconciliation/invariant"
 	"github.com/uber/cadence/common/reconciliation/store"
-	"github.com/uber/cadence/common/service/dynamicconfig"
 	"github.com/uber/cadence/service/worker/scanner/shardscanner"
 )
 
diff --git a/tools/cassandra/version_test.go b/tools/cassandra/version_test.go
index 51cab8bcb..d9d9f9df4 100644
--- a/tools/cassandra/version_test.go
+++ b/tools/cassandra/version_test.go
@@ -35,8 +35,8 @@ import (
 	"github.com/stretchr/testify/suite"
 
 	"github.com/uber/cadence/common"
-	"github.com/uber/cadence/common/service/config"
-	"github.com/uber/cadence/common/service/dynamicconfig"
+	"github.com/uber/cadence/common/config"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/environment"
 )
 
diff --git a/tools/sql/clitest/connTest.go b/tools/sql/clitest/connTest.go
index c2725b4b6..1cdde5f04 100644
--- a/tools/sql/clitest/connTest.go
+++ b/tools/sql/clitest/connTest.go
@@ -26,8 +26,8 @@ import (
 
 	"github.com/stretchr/testify/require"
 
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/common/log/tag"
-	"github.com/uber/cadence/common/service/config"
 	"github.com/uber/cadence/environment"
 	"github.com/uber/cadence/tools/common/schema/test"
 	"github.com/uber/cadence/tools/sql"
diff --git a/tools/sql/clitest/handlerTest.go b/tools/sql/clitest/handlerTest.go
index a596db03f..cf797241b 100644
--- a/tools/sql/clitest/handlerTest.go
+++ b/tools/sql/clitest/handlerTest.go
@@ -28,7 +28,7 @@ import (
 	"github.com/stretchr/testify/suite"
 
 	"github.com/uber/cadence/common/auth"
-	"github.com/uber/cadence/common/service/config"
+	"github.com/uber/cadence/common/config"
 	"github.com/uber/cadence/environment"
 	"github.com/uber/cadence/tools/sql"
 )
diff --git a/tools/sql/clitest/versionTest.go b/tools/sql/clitest/versionTest.go
index 48b7f2fef..cb4e19b5a 100644
--- a/tools/sql/clitest/versionTest.go
+++ b/tools/sql/clitest/versionTest.go
@@ -34,8 +34,8 @@ import (
 	"github.com/stretchr/testify/suite"
 
 	"github.com/uber/cadence/common"
-	"github.com/uber/cadence/common/service/config"
-	"github.com/uber/cadence/common/service/dynamicconfig"
+	"github.com/uber/cadence/common/config"
+	"github.com/uber/cadence/common/dynamicconfig"
 	"github.com/uber/cadence/environment"
 	"github.com/uber/cadence/tools/sql"
 )