List functional requirements for the system (Ask the chat bot for hints if stuck.)...
List non-functional requirements for the system...
User and Session Scale
Data Volume
Define what APIs are expected from the system...
This API calls will be
All work with REST communication because the simple synchronous request response nature is well suited in addition being stateless makes it easier to scale
Defining the system data model early on will clarify how data will flow among different components of the system. Also you could draw an ER diagram using the diagramming tool to enhance your design...
Data model- structured data in relational databases for users and transactions to ensure and maintain ACID properties of financial data and less structured key value pairs for Fraud analysis data or logging data
Schema
User
Transaction
Fraud Analysis
Logging
Primary key partitions by most frequently accessed key, can do sharding to distribute databases by having instance handle a discrete range of ids. Amazon Aurora PostgreSQL would be a good choice for the User and transaction databases, and AWS DocumentDB with MongoDB for the non-relational databases. These will work with a caching layer, something like Elasticache or Redis to reduce read operations
You should identify enough components that are needed to solve the actual problem from end to end. Also remember to draw a block diagram using the diagramming tool to augment your design. If you are unfamiliar with the tool, you can simply describe your design to the chat bot and ask it to generate a starter diagram for you to modify...
Key Components/Interactions
Explain how the request flows from end to end in your high level design. Also you could draw a sequence diagram using the diagramming tool to enhance your explanation...
Dig deeper into 2-3 components and explain in detail how they work. For example, how well does each component scale? Any relevant algorithm or data structure you like to use for a component? Also you could draw a diagram using the diagramming tool to enhance your design...
Analysis Database -
Load Balancer
Transaction DB
Explain any trade offs you have made and why you made certain tech choices...
ID generation- ID generation could be done with hashing or a random number generator. Hashing would provide consistent mapping and use less compute power but cause more collision and need additional collision strategies to handle. Even though random number generation requires compute power modern systems can provide efficient number generation and it will significantly reduce collisions, and any collisions that happen can just have the ID re-generated. There would need to be some additional work done to make sure that the IDs generated are being evenly spread across how the databases are sharded but that would just be generating withing alternating windows of ranges.
Load Balancer- Amazon ALB is used for this system because it benefits from the Layer 7 routing, SSL termination and proxy, and content-based routing to multiple service. In addition it benefits from integration in the AWS ecosystem.
SQL Data bases- an amazon product was chosen because with all components in the AWS ecosystem there is better integration and support, Google Spanner may provide more consistency with its TrueTime API but the benefits of an integrated ecosystem outweigh that gain, especially because Amazon Aurora also strongly supports the ACID principles needed for these databases.
NoSQL DB- DocumentDB was chosen, again there is the AWS integration as well as the ability to utilize MongoDB. Since the data processing service may need to pull data by a number of different fields in complex ways and needs to do so quickly, the complex query support of MongoDB was ideal for this application to quickly retrieve a mix of data to enrich before sending to Sagemaker. Also consistency can be more relaxed here so SQL would be unnecessary and the highly tunable consistency of something like Apache Cassandra would be less relevant
Cache- for the cache I would lean AWS Elasticache again for ease of integration with the rest of the AWS ecosystem, with the exception of possible regulations in certain regions requiring more granularity in configuration in which case something like Redis may be better
API Gateway vs. Direct service invocation
Session management Stateless vs Stateful
Try to discuss as many failure scenarios/bottlenecks as possible.
Bottlenecks
What are some future improvements you would make? How would you mitigate the failure scenario(s) you described above?
Implement CloudFront for lower global latency and better global availability
Machine Learning for Traffic Prediction
Increased Interoperability
Mobile Application Integration