You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(WIP): Update AWS Guide with notes on Proxy and Perf
Discusses how the root of the differences between AWS and GCP is the difference between AWS Nitro Enclaves and GCP Confidential Compute Spaces, how this requires the AWS TCP-to-VSOCK proxy, and that (and how) this affects server performance.
Also updates the self-serve guide to include our scaling recommendations
for each service, and AWS-specific enclave CPU allocation
recommendations.
Copy file name to clipboardExpand all lines: bidding_auction_services_aws_guide.md
+14-3Lines changed: 14 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,11 +18,21 @@ The FLEDGE Bidding and Auction services will be open-sourced in Q2 2023. In addi
18
18
19
19
20
20
#### Comparison to Google Cloud Platform (GCP)
21
-
While this document focuses on AWS, [a similar document was published for GCP in Q2 2023][53]. We intend to provide full GCP and AWS support for these services. Most implementation details will be, at a high level, similar. A few notable exceptions (ultimately with no impact on functionality) are:
21
+
While this document focuses on AWS, [a similar document was published for GCP in Q2 2023][53]. We intend to provide full GCP and AWS support for these services. The API for each platform is identical. Most implementation details will be, at a high level, similar.
22
+
23
+
However, AWS's Nitro Enclaves differ significantly from GCP's confidential compute spaces architecturally. [GCP confidential spaces share the same kernel as their host machine and permit most network communication natively][5], whereas AWS Nitro Enclaves run a fully-separate linux kernel and can communicate with the host OS only over the VSOCK protocol. As a result of these additional complications introduced by the AWS approach to TEEs:
24
+
* AWS instances run a TCP-to-VSOCK proxy to enable network ingress and egress to and from the enclave.
25
+
* This proxy has elements running both inside and outside the enclave, and compute resources (vCPU cores) must be allocated accordingly.
26
+
* Due to both the need for a proxy and its limitations, networking performance characteristics of B&A servers on AWS are not identical to GCP. Specifically, in our testing:
27
+
* Instances of the backend services (auction service and bidding service) perform very similarly to GCP in terms of queries per second per vCPU.
28
+
* Instances of the frontend services (Buyer Front-End Service and Seller Front-End Service) may not be able to serve the same throughput as equivantly-sized instances on GCP. This is dependent on the amount of network traffic performed in the key-value service lookup.
29
+
30
+
We highly recommend AdTechs refer to [both the general and AWS-specific notes on service scaling behavior in the self-serve guide][56]. These provide crucial guidance for determining number and size of instances on AWS and allocating memory and vCPU cores between the parent and enclave (a concept particular to AWS TEEs).
31
+
32
+
A few other notable exceptions (ultimately with no impact on functionality):
22
33
23
-
1. GCP is based on a single [virtual machine instance][5], so a parent-child instance relationship will not be required to host the running trusted code in GCP.
24
34
1. The [Envoy component][4] runs inside the Seller Frontend TEE in GCP.
25
-
1.Each EC2 instance in AWS runs the following outside TEE: a health-checking script, and an instance of Envoy in a container. These support the [service mesh][3] for AWS. No such infrastructure is needed for mesh on GCP.
35
+
1.When deployed and run with [service mesh][3], each EC2 instance in AWS runs the following outside TEE: a health-checking script, and an instance of Envoy in a container. No such infrastructure is needed for mesh on GCP.
Copy file name to clipboardExpand all lines: bidding_auction_services_onboarding_self_serve_guide.md
+34-2Lines changed: 34 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -684,8 +684,8 @@ The following parameters are optional, per cloud region:
684
684
The following scaling and latency strategy will help determine the size and
685
685
number of instances required to serve scaled traffic with an acceptable latency.
686
686
This would involve the following:
687
-
* Vertical scaling
688
-
* Horizontal scaling
687
+
* Vertical scaling (use a larger instance for the service)
688
+
* Horizontal scaling (add more instances of the same size for the service)
689
689
690
690
#### Vertical scaling
691
691
@@ -801,6 +801,16 @@ number of ads per request, and the average size of `trustedScoringSignals` per a
801
801
</tr>
802
802
</table>
803
803
804
+
Seller Front-End Service Scaling Properties:
805
+
806
+
For many workloads with which the B&A team has tested, especially those with large KV signal fetches, SFE Service is neither CPU- nor memory- bound; that is, it needs enough of each of these resources but will hit its maximum throughput without exhausting either.
807
+
808
+
This effect is much more pronounced on AWS than on GCP, due to the AWS TCP-to-VSOCK proxy, but exists on both platforms to some degree due to service architecture.
809
+
810
+
As a result, SFE tends to scale poorly vertically, but scales well horizontally. If you have exhausted the throughput of your SFE, we recommend you add another SFE of a similar size, and so on, to increase throughput and decrease latency.
811
+
812
+
On AWS, we recommend AdTechs start their dialing-in by reserving _half_ of the instance's vCPU cores and 4GB memory for running the parent, regardless of instance size.
813
+
804
814
###### Auction Service
805
815
806
816
The Auction service usually requires higher compute power than the SFE to support
@@ -827,6 +837,12 @@ the same RPS, since every `scoreAd()` execution happens in isolation per ad.
827
837
</tr>
828
838
</table>
829
839
840
+
Auction Service Scaling Properties:
841
+
842
+
For many workloads with which the B&A team has tested, Auction Service is CPU-bound; that is, its throughput is scales primarily with available compute power. Auction service thus scales well both vertically and horizontally.
843
+
844
+
On AWS, we recommend AdTechs start their dialing-in by reserving 2 vCPU cores and 4GB memory for running the parent, regardless of instance size.
845
+
830
846
###### Determine SFE / Auction instances ratio
831
847
832
848
A **single** SFE instance can support a higher RPS with multiple Auction server
@@ -877,6 +893,16 @@ per interest group.
877
893
</tr>
878
894
</table>
879
895
896
+
Buyer Front-End Service Scaling Properties:
897
+
898
+
For many workloads with which the B&A team has tested, especially those with large KV signal fetches, BFE Service is neither CPU- nor memory- bound; that is, it needs enough of each of these resources but will hit its maximum throughput without exhausting either.
899
+
900
+
This effect is much more pronounced on AWS than on GCP, due to the AWS TCP-to-VSOCK proxy, but exists on both platforms to some degree due to service architecture.
901
+
902
+
As a result, BFE tends to scale poorly vertically, but scales well horizontally. If you have exhausted the throughput of your BFE, we recommend you add another BFE of a similar size, and so on, to increase throughput and decrease latency.
903
+
904
+
On AWS, we recommend AdTechs start their dialing-in by reserving _half_ of the instance's vCPU cores and 4GB memory for running the parent, regardless of instance size.
905
+
880
906
###### Bidding service
881
907
882
908
The Bidding service usually requires higher compute power than the BFE to support
@@ -901,6 +927,12 @@ interest group.
901
927
</tr>
902
928
</table>
903
929
930
+
Bidding Service Scaling Properties:
931
+
932
+
For many workloads with which the B&A team has tested, Bidding Service is CPU-bound; that is, its throughput is scales primarily with available compute power. Bidding service thus scales well both vertically and horizontally.
933
+
934
+
On AWS, we recommend AdTechs start their dialing-in by reserving 2 vCPU cores and 4GB memory for running the parent, regardless of instance size.
935
+
904
936
###### Determine BFE / Bidding instances ratio
905
937
906
938
A **single** BFE service instance can support a higher RPS with multiple Bidding
0 commit comments