5 Steps for Selecting a High-Performance NoSQL Database
See five steps for selecting a high-performance NoSQL database.
Join the DZone community and get the full member experience.
Join For FreeDevelopment teams building online and operational applications increasingly choose a new class of databases to support them. It's called "NoSQL," or "Not Only SQL", and includes options such as Redis, MongoDB, and others. Selecting the right database from among the available NoSQL solutions is one of the most important decisions you can make when designing a new application. So, if you are evaluating NoSQL databases, read on for some recommendations that will aid in your selection.
When choosing your database, there are five high-level steps you should follow:
- Define the goals for your NoSQL database.
- Identify your throughput and latency requirements.
- Select the right database for the right job.
- Choose between managed service providers or do-it-yourself (DIY).
- Decide on the best deployment mode for your situation.
1. Define Goals for Your Database
The goal of a NoSQL database might be to support personalized digital experiences for thousands of users on mobile devices, store data for a back-end payment processing application, manage ephemeral data that has a certain time to live, or store persistent data as a system of record. You could even involve multiple types of databases in the same data pipeline for a particular scenario.
Regardless of your use case, it is important to define the specific function of the NoSQL database in your data pipeline, including how data will be collected, ingested and made available for analysis.
2. Identify Throughput and Latency Requirements
In today's age, users expect instantaneous experiences. Typically, this requires consistent response times of <100ms from your application. Otherwise, it will be perceived as slow, and you might lose users' interest. However, some applications — such as gaming, communications, and financial trading systems — demand response times as low as 13ms from their databases.
In addition to latency, you also need to identify throughput requirements. For example, can your database process thousands of simultaneous data streams with latencies as low as 50ms or better?
Understanding the demands that will be put on the database is important to ensuring the quality of the user experience.
3. Select the Right Database for the Right Job
Typically, developers choose NoSQL databases because they require semi-structured or unstructured data with flexible schema, simple query patterns, high-velocity transactions, a large volume of data, and quick and cheap scalability via distributed computing and storage. You can further narrow down your choices through the CAP theorem, which is defined as follows on :
- Consistency: Every read receives the most recent write or an error.
- Availability: Every request receives a (non-error) response — without the guarantee that it contains the most recent write.
- Partition tolerance: The system continues to operate despite an arbitrary number of messages being dropped (or delayed) by the network between node.
From the CAP theorem, you can prioritize CA, AP or CP characteristics. This helps you determine which database might be a good fit for your application.
4. Choose Between Managed Service Providers and Do-It-Yourself (DIY)
A managed services solution handles the day-to-day management of your database with experienced resources. This enables your own resources to focus on the innovation and efficiencies that are required in your applications. If you go this direction, evaluate third-party options that offer database-as-a-service options, and pick a provider that can handle your throughput and latency requirements while guaranteeing uptime.
Of course, outsourcing may not always be the option, in which case, you should consider which database providers offer a software version with support for provisioning, scheduling and managing containers at scale. Be sure to check for your most desired capabilities, such as scalability, active-active deployment, throughput, and latency — and verify them during a proof-of-concept trial.
5. Decide on the Deployment Mode
Ideally, you want a database provider that will let you run the database in any environment of your choice (whether that be public or private), with full control over your data and configuration. Your database software should also be available as a Docker image, which will allow your enterprise developers to use it in their Docker-based microservices architecture.
If you use a private platform-as-a-service (PaaS), make sure your database provider supports seamless scaling and effortless high availability in private PaaS environments, such as Pivotal, Bluemix, Heroku and others.
If you select a managed service provider, confirm that they support clustered deployments across multi-cloud providers, including AWS, Azure, and Google.
Benefits of Making the Right NoSQL Database Choice
Some of the advantages of a well-thought-out decision include:
- Faster time-to-market with continuity between development, test and production environments.
- High availability and easier scalability when integrated with Docker orchestration tools.
- Faster throughput, with minimal latency and guaranteed uptime
- Multi-cloud deployment options globally
- Great cost savings when using managed service providers
What do you think? Leave your thoughts in the comments section.
Published at DZone with permission of Shabih Syed. See the original article here.
Opinions expressed by DZone contributors are their own.
Comments