Joke Collection Website - Public benefit messages - Construction of short message communication service?
Construction of short message communication service?
Non-functional requirements mainly include the following:
A, stable delivery guarantee:
It is divided into two parts, one is the stability of the service itself, and the other is the stability of the SMS service provider.
The stability of the service itself needs to be realized by itself, and some existing tools of the micro-service platform can guarantee it, so we will not expand it here. The other one needs external guarantee, and the one that needs external guarantee is always fragile, so it is necessary to use not only one service provider, but also multiple ones.
Second, it is convenient to expand:
Next, it may be necessary to change service providers, and it is necessary to ensure that ready-made service providers are easily available.
Third, asset protection:
A difference between SMS and email, WeChat notification, etc. That is, the cost is relatively high. The price of a message is about 3 cents. Long short messages will be split into multiple messages, and if they are not protected, it will easily cause a lot of financial losses.
Fourth, technology choice.
With the above requirements, what technology should I choose? The basic web service can be the company's existing service. For storage, because it involves sending information and reports, the volume may be large (in fact, it's okay after going online, less than 10 million records in three months). When doing statistics, using MySQL and the like may not be reliable, so choose ES. In order to be safe, it is necessary to limit the daily transmission volume and frequency of mobile phone numbers. this
Verb (short for verb) visits multiple service providers.
It requires the access of multiple service providers, and one service provider may provide multiple SMS functions at the same time. At the same time, the same SMS function needs to call all service providers in turn, and try again after one fails. It also needs to support flexible configuration, which can disable some service providers or easily add new ones.
Six, send limit settings
To count the number of mobile phone numbers and ip transmissions, simply use the incr of reids and the key related to the timestamp, so I won't go into details here. If transmission is restricted, different functions should be targeted at first, because the usage of different functions is completely different, and it also has the function of isolation. If one function exceeds the limit, it cannot affect other functions.
Secondly, the restrictions on sending need to be hierarchical. When the global limit is reached, even if it does not exceed the limit of a single mobile phone, it should not be sent.
Seven, the use level is:
Global time of the function->; Single access application limit (times/whitelist/switch)->; Single phone /ip limit (times/whitelist/switch)->; The frequency of risk control services (switching) should be adjusted according to statistical data and business changes.
Eight. perform
This service is obviously IO-intensive, so there is no calculation. Mainly call various external services and wait for IO to return. Therefore, these thread pools for issuing requests can be configured slightly larger, mainly HTTP connection pools. However, the connection timeout and read timeout are not suitable for setting too large.
- Related articles
- Congratulations on this transaction.
- Why didn't oppo a53 reply to the drug inquiry SMS?
- How to return Gu Jian Xiaoyao?
- Sentences expressing fate
- When installing software on an Android phone, you will be prompted that the software has the right to automatically make calls and send short messages. Is it safe to install such software?
- Hua: What bug is Sweet Baby?
- My mobile phone is dual card dual standby. I don't know which card it was when the phone text message came. Is there an app that can recognize cards?
- Spring Festival poems, couplets, short messages
- What is an IOT card?
- How to avoid being deceived by real estate agents when buying a house?