diff --git a/http-core/src/main/mima-filters/1.3.x.backwards.excludes/http2-out-of-preview.excludes b/http-core/src/main/mima-filters/1.3.x.backwards.excludes/http2-out-of-preview.excludes new file mode 100644 index 000000000..61efca5c8 --- /dev/null +++ b/http-core/src/main/mima-filters/1.3.x.backwards.excludes/http2-out-of-preview.excludes @@ -0,0 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# HTTP/2 is no longer in preview +ProblemFilters.exclude[ReversedMissingMethodProblem]("org.apache.pekko.http.javadsl.settings.ServerSettings.enableHttp2") +ProblemFilters.exclude[ReversedMissingMethodProblem]("org.apache.pekko.http.scaladsl.settings.ServerSettings.enableHttp2") diff --git a/http-core/src/main/resources/reference.conf b/http-core/src/main/resources/reference.conf index fae5ac0b1..fb2c89a29 100644 --- a/http-core/src/main/resources/reference.conf +++ b/http-core/src/main/resources/reference.conf @@ -20,6 +20,15 @@ pekko.http { # the request, no `Server` header will be rendered at all. server-header = pekko-http/${pekko.http.version} + # If this setting is enabled `Http().newServerAt(...).bind` and `bindSync` + # will be enabled to use HTTP/2. + # + # `Http().newServerAt(...).bindFlow` and `connectionSource()` are not supported. + # + # Note that this setting is intended to replace `pekko.http.server.preview.enable-http2` + # but that setting is still supported for compatibility reasons. + enable-http2 = off + # "PREVIEW" features that are not yet fully production ready. # These flags can change or be removed between patch releases. preview { @@ -27,7 +36,9 @@ pekko.http { # will be enabled to use HTTP/2. # # `Http().newServerAt(...).bindFlow` and `connectionSource()` are not supported. - enable-http2 = off + # + # Note that this setting is ignored if `pekko.http.server.enable-http2` is set to `on`. + enable-http2 = ${pekko.http.server.enable-http2} } # The time after which an idle connection will be automatically closed. diff --git a/http-core/src/main/scala/org/apache/pekko/http/impl/settings/ServerSettingsImpl.scala b/http-core/src/main/scala/org/apache/pekko/http/impl/settings/ServerSettingsImpl.scala index 273645f53..91782018d 100644 --- a/http-core/src/main/scala/org/apache/pekko/http/impl/settings/ServerSettingsImpl.scala +++ b/http-core/src/main/scala/org/apache/pekko/http/impl/settings/ServerSettingsImpl.scala @@ -14,6 +14,7 @@ package org.apache.pekko.http.impl.settings import scala.language.implicitConversions +import scala.annotation.nowarn import scala.collection.immutable import scala.concurrent.duration._ import scala.util.Try @@ -36,7 +37,7 @@ import pekko.io.Inet.SocketOption @InternalApi private[pekko] final case class ServerSettingsImpl( serverHeader: Option[Server], - previewServerSettings: PreviewServerSettings, + @nowarn("msg=deprecated") previewServerSettings: PreviewServerSettings, timeouts: ServerSettings.Timeouts, maxConnections: Int, pipeliningLimit: Int, @@ -56,7 +57,8 @@ private[pekko] final case class ServerSettingsImpl( defaultHttpsPort: Int, terminationDeadlineExceededResponse: HttpResponse, parsingErrorHandler: String, - streamCancellationDelay: FiniteDuration) extends ServerSettings { + streamCancellationDelay: FiniteDuration, + enableHttp2: Boolean) extends ServerSettings { require(0 < maxConnections, "max-connections must be > 0") require(0 < pipeliningLimit && pipeliningLimit <= 1024, "pipelining-limit must be > 0 and <= 1024") @@ -90,9 +92,10 @@ private[http] object ServerSettingsImpl extends SettingsCompanionImpl[ServerSett def fromSubConfig(root: Config, c: Config) = { val parserSettings = ParserSettingsImpl.fromSubConfig(root, c.getConfig("parsing")) + val previewSettings = PreviewServerSettingsImpl.fromSubConfig(root, c.getConfig("preview")) new ServerSettingsImpl( c.getString("server-header").toOption.map(Server(_)), - PreviewServerSettingsImpl.fromSubConfig(root, c.getConfig("preview")), + previewSettings, Timeouts( c.getPotentiallyInfiniteDuration("idle-timeout"), if (c.getString("request-timeout") == "off") Duration.Zero @@ -123,7 +126,8 @@ private[http] object ServerSettingsImpl extends SettingsCompanionImpl[ServerSett c.getInt("default-https-port"), terminationDeadlineExceededResponseFrom(c), c.getString("parsing.error-handler"), - c.getFiniteDuration("stream-cancellation-delay")) + c.getFiniteDuration("stream-cancellation-delay"), + c.getBoolean("enable-http2") || previewSettings.enableHttp2) } private def terminationDeadlineExceededResponseFrom(c: Config): HttpResponse = { diff --git a/http-core/src/main/scala/org/apache/pekko/http/javadsl/settings/PreviewServerSettings.scala b/http-core/src/main/scala/org/apache/pekko/http/javadsl/settings/PreviewServerSettings.scala index b69e528f9..c3c148c3a 100644 --- a/http-core/src/main/scala/org/apache/pekko/http/javadsl/settings/PreviewServerSettings.scala +++ b/http-core/src/main/scala/org/apache/pekko/http/javadsl/settings/PreviewServerSettings.scala @@ -25,8 +25,12 @@ import com.typesafe.config.Config * Options that are in "preview" or "early access" mode. * These options may change and/or be removed within patch releases * without early notice (e.g. by moving them into a stable supported place). + * + * @deprecated PreviewServerSettings is deprecated, use pekko.http.javadsl.settings.ServerSettings instead (since 1.3.0) */ @ApiMayChange @DoNotInherit +@Deprecated +@deprecated("PreviewServerSettings is deprecated, use pekko.http.javadsl.settings.ServerSettings instead", "1.3.0") abstract class PreviewServerSettings private[pekko] () { self: PreviewServerSettingsImpl => /** diff --git a/http-core/src/main/scala/org/apache/pekko/http/javadsl/settings/ServerSettings.scala b/http-core/src/main/scala/org/apache/pekko/http/javadsl/settings/ServerSettings.scala index 15ca39707..1f9dcc1db 100644 --- a/http-core/src/main/scala/org/apache/pekko/http/javadsl/settings/ServerSettings.scala +++ b/http-core/src/main/scala/org/apache/pekko/http/javadsl/settings/ServerSettings.scala @@ -34,6 +34,7 @@ import scala.concurrent.duration.{ Duration, FiniteDuration } */ @DoNotInherit abstract class ServerSettings { self: ServerSettingsImpl => def getServerHeader: Optional[Server] + @deprecated("the preview server settings are now integrated into the main server settings", "1.3.0") def getPreviewServerSettings: PreviewServerSettings def getTimeouts: ServerSettings.Timeouts def getMaxConnections: Int @@ -56,10 +57,19 @@ import scala.concurrent.duration.{ Duration, FiniteDuration } def getParsingErrorHandler: String def getStreamCancellationDelay: FiniteDuration + /** + * Configures the Http extension to bind using HTTP/2 if given an + * [[pekko.http.scaladsl.HttpsConnectionContext]]. Otherwise binds as plain HTTP. + * + * @since 1.3.0 + */ + def enableHttp2: Boolean + // --- def withServerHeader(newValue: Optional[Server]): ServerSettings = self.copy(serverHeader = newValue.toScala.map(_.asScala)) + @deprecated("the preview server settings are now integrated into the main server settings", "1.3.0") def withPreviewServerSettings(newValue: PreviewServerSettings): ServerSettings = self.copy(previewServerSettings = newValue.asScala) def withTimeouts(newValue: ServerSettings.Timeouts): ServerSettings = self.copy(timeouts = newValue.asScala) @@ -87,6 +97,11 @@ import scala.concurrent.duration.{ Duration, FiniteDuration } def withParsingErrorHandler(newValue: String): ServerSettings = self.copy(parsingErrorHandler = parsingErrorHandler) def withStreamCancellationDelay(newValue: FiniteDuration): ServerSettings = self.copy(streamCancellationDelay = newValue) + + /** + * @since 1.3.0 + */ + def withEnableHttp2(newValue: Boolean): ServerSettings = self.copy(enableHttp2 = newValue) } object ServerSettings extends SettingsCompanion[ServerSettings] { diff --git a/http-core/src/main/scala/org/apache/pekko/http/scaladsl/Http.scala b/http-core/src/main/scala/org/apache/pekko/http/scaladsl/Http.scala index 17a5044a1..6a7f2692d 100644 --- a/http-core/src/main/scala/org/apache/pekko/http/scaladsl/Http.scala +++ b/http-core/src/main/scala/org/apache/pekko/http/scaladsl/Http.scala @@ -180,7 +180,7 @@ class HttpExt @InternalStableApi /* constructor signature is hardcoded in Teleme connectionContext: ConnectionContext, settings: ServerSettings, log: LoggingAdapter): Source[Http.IncomingConnection, Future[ServerBinding]] = { - if (settings.previewServerSettings.enableHttp2) + if (settings.enableHttp2) log.warning( s"Binding with a connection source not supported with HTTP/2. Falling back to HTTP/1.1 for port [$port]") @@ -221,7 +221,7 @@ class HttpExt @InternalStableApi /* constructor signature is hardcoded in Teleme connectionContext: ConnectionContext, settings: ServerSettings, log: LoggingAdapter)(implicit fm: Materializer): Future[ServerBinding] = { - if (settings.previewServerSettings.enableHttp2) + if (settings.enableHttp2) log.warning( s"Binding with a connection source not supported with HTTP/2. Falling back to HTTP/1.1 for port [$port].") @@ -282,7 +282,7 @@ class HttpExt @InternalStableApi /* constructor signature is hardcoded in Teleme settings: ServerSettings, parallelism: Int, log: LoggingAdapter)(implicit fm: Materializer): Future[ServerBinding] = { - if (settings.previewServerSettings.enableHttp2) { + if (settings.enableHttp2) { log.debug("Binding server using HTTP/2") val definitiveSettings = diff --git a/http-core/src/main/scala/org/apache/pekko/http/scaladsl/settings/PreviewServerSettings.scala b/http-core/src/main/scala/org/apache/pekko/http/scaladsl/settings/PreviewServerSettings.scala index acba1b782..9de8d7beb 100644 --- a/http-core/src/main/scala/org/apache/pekko/http/scaladsl/settings/PreviewServerSettings.scala +++ b/http-core/src/main/scala/org/apache/pekko/http/scaladsl/settings/PreviewServerSettings.scala @@ -24,8 +24,11 @@ import com.typesafe.config.Config * Options that are in "preview" or "early access" mode. * These options may change and/or be removed within patch releases * without early notice (e.g. by moving them into a stable supported place). + * + * @deprecated PreviewServerSettings is deprecated, use pekko.http.scaladsl.settings.ServerSettings instead (since 1.3.0) */ @ApiMayChange @DoNotInherit +@deprecated("PreviewServerSettings is deprecated, use pekko.http.scaladsl.settings.ServerSettings instead", "1.3.0") abstract class PreviewServerSettings private[pekko] () extends org.apache.pekko.http.javadsl.settings.PreviewServerSettings { self: PreviewServerSettingsImpl => diff --git a/http-core/src/main/scala/org/apache/pekko/http/scaladsl/settings/ServerSettings.scala b/http-core/src/main/scala/org/apache/pekko/http/scaladsl/settings/ServerSettings.scala index a655e8448..79599fa86 100644 --- a/http-core/src/main/scala/org/apache/pekko/http/scaladsl/settings/ServerSettings.scala +++ b/http-core/src/main/scala/org/apache/pekko/http/scaladsl/settings/ServerSettings.scala @@ -61,9 +61,23 @@ abstract class ServerSettings private[pekko] () extends pekko.http.javadsl.setti def parsingErrorHandler: String def streamCancellationDelay: FiniteDuration + /** + * Configures the Http extension to bind using HTTP/2 if given an + * [[pekko.http.scaladsl.HttpsConnectionContext]]. Otherwise binds as plain HTTP. + * + * @since 1.3.0 + */ + def enableHttp2: Boolean + /* Java APIs */ override def getBacklog = this.backlog + + /** + * @deprecated the preview server settings are now integrated into the main server settings (since 1.3.0) + */ + @Deprecated + @deprecated("the preview server settings are now integrated into the main server settings", "1.3.0") override def getPreviewServerSettings: pekko.http.javadsl.settings.PreviewServerSettings = this.previewServerSettings override def getDefaultHostHeader = this.defaultHostHeader.asJava override def getPipeliningLimit = this.pipeliningLimit @@ -87,6 +101,11 @@ abstract class ServerSettings private[pekko] () extends pekko.http.javadsl.setti // --- // override for more specific return type + /** + * @deprecated the preview server settings are now integrated into the main server settings (since 1.3.0) + */ + @Deprecated + @deprecated("the preview server settings are now integrated into the main server settings", "1.3.0") def withPreviewServerSettings(newValue: PreviewServerSettings): ServerSettings = self.copy(previewServerSettings = newValue) override def withMaxConnections(newValue: Int): ServerSettings = self.copy(maxConnections = newValue) @@ -110,6 +129,7 @@ abstract class ServerSettings private[pekko] () extends pekko.http.javadsl.setti override def withParsingErrorHandler(newValue: String): ServerSettings = self.copy(parsingErrorHandler = newValue) override def withStreamCancellationDelay(newValue: FiniteDuration): ServerSettings = self.copy(streamCancellationDelay = newValue) + override def withEnableHttp2(newValue: Boolean): ServerSettings = self.copy(enableHttp2 = newValue) // overloads for Scala idiomatic use def withTimeouts(newValue: ServerSettings.Timeouts): ServerSettings = self.copy(timeouts = newValue) diff --git a/http-core/src/test/scala/org/apache/pekko/http/scaladsl/ClientServerSpec.scala b/http-core/src/test/scala/org/apache/pekko/http/scaladsl/ClientServerSpec.scala index 9f8649d46..e53091199 100644 --- a/http-core/src/test/scala/org/apache/pekko/http/scaladsl/ClientServerSpec.scala +++ b/http-core/src/test/scala/org/apache/pekko/http/scaladsl/ClientServerSpec.scala @@ -58,7 +58,7 @@ class ClientServerHttp2EnabledSpec extends ClientServerSpecBase(http2 = true) abstract class ClientServerSpecBase(http2: Boolean) extends PekkoSpecWithMaterializer( s""" - pekko.http.server.preview.enable-http2 = $http2 + pekko.http.server.enable-http2 = $http2 pekko.http.server.request-timeout = infinite pekko.http.server.log-unencrypted-network-bytes = 200 pekko.http.client.log-unencrypted-network-bytes = 200 diff --git a/http-core/src/test/scala/org/apache/pekko/http/scaladsl/settings/ServerSettingsSpec.scala b/http-core/src/test/scala/org/apache/pekko/http/scaladsl/settings/ServerSettingsSpec.scala index 20197cb52..9c1b72a63 100644 --- a/http-core/src/test/scala/org/apache/pekko/http/scaladsl/settings/ServerSettingsSpec.scala +++ b/http-core/src/test/scala/org/apache/pekko/http/scaladsl/settings/ServerSettingsSpec.scala @@ -13,6 +13,7 @@ package org.apache.pekko.http.scaladsl.settings +import com.typesafe.config.ConfigFactory import org.apache.pekko.testkit.PekkoSpec class ServerSettingsSpec extends PekkoSpec { @@ -32,5 +33,37 @@ class ServerSettingsSpec extends PekkoSpec { } e.getMessage should include("does not contain the server-specific settings") } + "default enableHttp2 to false" in { + val serverSettings = ServerSettings(system) + serverSettings.enableHttp2 should ===(false) + } + "set enableHttp2 to true if preview.enable-http2 is on" in { + val cfg = ConfigFactory.parseString(""" + pekko.http.server { + preview.enable-http2 = on + } + """).withFallback(system.settings.config) + val serverSettings = ServerSettings(cfg) + serverSettings.enableHttp2 should ===(true) + } + "set enableHttp2 to true if enable-http2 is on" in { + val cfg = ConfigFactory.parseString(""" + pekko.http.server { + enable-http2 = on + } + """).withFallback(system.settings.config) + val serverSettings = ServerSettings(cfg) + serverSettings.enableHttp2 should ===(true) + } + "set enableHttp2 to true if enable-http2 is on and preview.enable-http2 is off" in { + val cfg = ConfigFactory.parseString(""" + pekko.http.server { + enable-http2 = on + preview.enable-http2 = off + } + """).withFallback(system.settings.config) + val serverSettings = ServerSettings(cfg) + serverSettings.enableHttp2 should ===(true) + } } } diff --git a/http2-tests/src/test/java/org/apache/pekko/http/javadsl/Http2JavaServerTest.java b/http2-tests/src/test/java/org/apache/pekko/http/javadsl/Http2JavaServerTest.java index 86b822477..8ad281779 100644 --- a/http2-tests/src/test/java/org/apache/pekko/http/javadsl/Http2JavaServerTest.java +++ b/http2-tests/src/test/java/org/apache/pekko/http/javadsl/Http2JavaServerTest.java @@ -35,7 +35,7 @@ public static void main(String[] args) { + "pekko.actor.serialize-messages = off\n" + "#pekko.actor.default-dispatcher.throughput = 1000\n" + "pekko.actor.default-dispatcher.fork-join-executor.parallelism-max=8\n" - + "pekko.http.server.preview.enable-http2 = on\n"); + + "pekko.http.server.enable-http2 = on\n"); ActorSystem system = ActorSystem.create("ServerTest", testConf); Function> handler = diff --git a/http2-tests/src/test/scala/org/apache/pekko/http/impl/engine/http2/H2SpecIntegrationSpec.scala b/http2-tests/src/test/scala/org/apache/pekko/http/impl/engine/http2/H2SpecIntegrationSpec.scala index 63bfb35ef..9907cbf60 100644 --- a/http2-tests/src/test/scala/org/apache/pekko/http/impl/engine/http2/H2SpecIntegrationSpec.scala +++ b/http2-tests/src/test/scala/org/apache/pekko/http/impl/engine/http2/H2SpecIntegrationSpec.scala @@ -35,7 +35,7 @@ class H2SpecIntegrationSpec extends PekkoFreeSpec( loglevel = DEBUG loggers = ["org.apache.pekko.http.impl.util.SilenceAllTestEventListener"] http.server.log-unencrypted-network-bytes = 100 - http.server.preview.enable-http2 = on + http.server.enable-http2 = on http.server.http2.log-frames = on actor.serialize-creators = off diff --git a/http2-tests/src/test/scala/org/apache/pekko/http/impl/engine/http2/H2cUpgradeSpec.scala b/http2-tests/src/test/scala/org/apache/pekko/http/impl/engine/http2/H2cUpgradeSpec.scala index 34c0a7413..555e627ec 100644 --- a/http2-tests/src/test/scala/org/apache/pekko/http/impl/engine/http2/H2cUpgradeSpec.scala +++ b/http2-tests/src/test/scala/org/apache/pekko/http/impl/engine/http2/H2cUpgradeSpec.scala @@ -27,7 +27,7 @@ import pekko.stream.scaladsl.{ Source, Tcp } import pekko.util.ByteString class H2cUpgradeSpec extends PekkoSpecWithMaterializer(""" - pekko.http.server.preview.enable-http2 = on + pekko.http.server.enable-http2 = on pekko.http.server.http2.log-frames = on """) { diff --git a/http2-tests/src/test/scala/org/apache/pekko/http/impl/engine/http2/Http2ClientServerSpec.scala b/http2-tests/src/test/scala/org/apache/pekko/http/impl/engine/http2/Http2ClientServerSpec.scala index b46ab3c00..75c8d9f5f 100644 --- a/http2-tests/src/test/scala/org/apache/pekko/http/impl/engine/http2/Http2ClientServerSpec.scala +++ b/http2-tests/src/test/scala/org/apache/pekko/http/impl/engine/http2/Http2ClientServerSpec.scala @@ -52,7 +52,7 @@ import org.scalatest.concurrent.ScalaFutures class Http2ClientServerSpec extends PekkoSpecWithMaterializer( """pekko.http.server.http2.log-frames = on pekko.http.server.log-unencrypted-network-bytes = 100 - pekko.http.server.preview.enable-http2 = on + pekko.http.server.enable-http2 = on pekko.http.client.http2.log-frames = on pekko.http.client.log-unencrypted-network-bytes = 100 pekko.actor.serialize-messages = false diff --git a/http2-tests/src/test/scala/org/apache/pekko/http/impl/engine/http2/Http2PersistentClientSpec.scala b/http2-tests/src/test/scala/org/apache/pekko/http/impl/engine/http2/Http2PersistentClientSpec.scala index 9c5d60b4d..b9e25cfb6 100644 --- a/http2-tests/src/test/scala/org/apache/pekko/http/impl/engine/http2/Http2PersistentClientSpec.scala +++ b/http2-tests/src/test/scala/org/apache/pekko/http/impl/engine/http2/Http2PersistentClientSpec.scala @@ -62,7 +62,7 @@ abstract class Http2PersistentClientSpec(tls: Boolean) extends PekkoSpecWithMate // FIXME: would rather use remote-address-attribute, but that doesn't work with HTTP/2 // see https://github.com/akka/akka-http/issues/3707 """pekko.http.server.remote-address-attribute = on - pekko.http.server.preview.enable-http2 = on + pekko.http.server.enable-http2 = on pekko.http.client.http2.log-frames = on pekko.http.client.http2.max-persistent-attempts = 5 pekko.http.client.log-unencrypted-network-bytes = 100 diff --git a/http2-tests/src/test/scala/org/apache/pekko/http/impl/engine/http2/TelemetrySpiSpec.scala b/http2-tests/src/test/scala/org/apache/pekko/http/impl/engine/http2/TelemetrySpiSpec.scala index 0e3ffe4d2..5a0d07cf1 100644 --- a/http2-tests/src/test/scala/org/apache/pekko/http/impl/engine/http2/TelemetrySpiSpec.scala +++ b/http2-tests/src/test/scala/org/apache/pekko/http/impl/engine/http2/TelemetrySpiSpec.scala @@ -68,7 +68,7 @@ class TelemetrySpiCypherSpec extends TelemetrySpiSpec(true) abstract class TelemetrySpiSpec(useTls: Boolean) extends PekkoSpecWithMaterializer( """ - pekko.http.server.preview.enable-http2 = on + pekko.http.server.enable-http2 = on pekko.actor.serialize-messages = false pekko.http.http2-telemetry-class = "org.apache.pekko.http.impl.engine.http2.TestTelemetryImpl" """) with ScalaFutures with BeforeAndAfterAll { diff --git a/http2-tests/src/test/scala/org/apache/pekko/http/impl/engine/http2/WithPriorKnowledgeSpec.scala b/http2-tests/src/test/scala/org/apache/pekko/http/impl/engine/http2/WithPriorKnowledgeSpec.scala index 258493cbf..931ba08a4 100644 --- a/http2-tests/src/test/scala/org/apache/pekko/http/impl/engine/http2/WithPriorKnowledgeSpec.scala +++ b/http2-tests/src/test/scala/org/apache/pekko/http/impl/engine/http2/WithPriorKnowledgeSpec.scala @@ -27,7 +27,7 @@ import pekko.stream.scaladsl.Sink import pekko.util.ByteString class WithPriorKnowledgeSpec extends PekkoSpecWithMaterializer(""" - pekko.http.server.preview.enable-http2 = on + pekko.http.server.enable-http2 = on pekko.http.server.http2.log-frames = on """) { diff --git a/http2-tests/src/test/scala/org/apache/pekko/http/scaladsl/Http2ServerTest.scala b/http2-tests/src/test/scala/org/apache/pekko/http/scaladsl/Http2ServerTest.scala index f82f180ae..c6d049e48 100644 --- a/http2-tests/src/test/scala/org/apache/pekko/http/scaladsl/Http2ServerTest.scala +++ b/http2-tests/src/test/scala/org/apache/pekko/http/scaladsl/Http2ServerTest.scala @@ -44,7 +44,7 @@ object Http2ServerTest extends App { pekko.actor.serialize-messages = off #pekko.actor.default-dispatcher.throughput = 1000 pekko.actor.default-dispatcher.fork-join-executor.parallelism-max=8 - pekko.http.server.preview.enable-http2 = true + pekko.http.server.enable-http2 = true """) implicit val system: ActorSystem = ActorSystem("ServerTest", testConf) implicit val ec: ExecutionContext = system.dispatcher