Create a DNS writer that multiplies 10x the domains in the DNS

This is a temporary change used for b/71607306 only, and has TODOs to revert at
every change once the bug is done.

We want to check how Cloud DNS handles large (1M+ domain) zones, especially
during resigning. However, due to a separate bug (b/70980350, and maybe another
one) we can't currently create such a large zone in nomulus within the required
4 day timeframe. The most we managed is 300k domains.

We could wait until the bug is fixed, but if there's a problem with Cloud DNS -
we want to find out as fast as possible. Hence, this CL that allows us to
register 1M domains by creating "just" 100k domains in nomulus.

The CL creates a new "MultiplyingCloudDnsWriter" writer, that when publishing a
domain, pretends that we are publishing 10 domains (with 9 additional
"fictional" domains, that get their Datastore data from the actual domain).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=180962149
This commit is contained in:
guyben 2018-01-05 12:41:16 -08:00 committed by Ben McIlwain
parent ffcfa283f6
commit 077600971f
2 changed files with 480 additions and 0 deletions

View file

@ -61,6 +61,14 @@ public final class CloudDnsWriterModule {
return writer;
}
// TODO(b/71607306): Remove once large zone resigning is tested
@Provides
@IntoMap
@StringKey(MultiplyingCloudDnsWriter.NAME)
static DnsWriter provideMultiplyingWriter(MultiplyingCloudDnsWriter writer) {
return writer;
}
@Provides
@IntoSet
@Named("dnsWriterNames")
@ -68,6 +76,14 @@ public final class CloudDnsWriterModule {
return CloudDnsWriter.NAME;
}
// TODO(b/71607306): Remove once large zone resigning is tested
@Provides
@IntoSet
@Named("dnsWriterNames")
static String provideMultiplyingWriterName() {
return MultiplyingCloudDnsWriter.NAME;
}
@Provides
@Named("cloudDns")
static RateLimiter provideRateLimiter() {