Joke Collection Website - Blessing messages - Java training of Beida Jade Bird: the construction of short message communication service?
Java training of Beida Jade Bird: the construction of short message communication service?
Non-functional requirements mainly include the following points: 1. 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, which can be guaranteed by some existing tools of the micro-service platform, so I won't expand it here. The other one needs external guarantee, and the one that needs external guarantee is always fragile, so it is impossible to use only one service provider. Need to use more than one. Second, convenient expansion: next, service providers may have the need to change, and it is necessary to ensure easy access to existing service providers. Third, asset protection: a difference between SMS and email, WeChat notification, etc. That is, the cost is relatively high. A short message with a price of about 3 cents will be split into multiple messages. If there is no restriction on protection, it is easy to cause a lot of capital loss. Fourthly, the technology selection is based on the above requirements. Companies can use basic web services. For storage, because it involves sending information and reports, the volume may be relatively large (actually, it is ok after going online, and it is less than10 million records in three months). Statistics may be based on some sent contents, and using MySQL or the like may not be reliable. Select ES. In order to be safe, it is necessary to limit the number and frequency of mobile phone numbers sent every day, and redis can easily solve it. 5. Access to multiple service providers requires access from 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 the 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.
6. Set the sending limit. Counting the sending times of mobile phone number and ip can be done simply by using incr of reids and the key related to timestamp. I don't need to repeat this here. If the transmission limit should be aimed at different functions first, because the usage of different functions is completely different, and it also has the function of isolation, one function can not affect other functions if it exceeds the limit. Second, the sending restrictions need to be layered. After reaching the global limit, it should not be sent out even if it does not exceed the limit of a single mobile phone. Single access application limit (times/whitelist/switch)->; Single phone /ip limit (times/whitelist/switch)->; The frequency of risk control services (switching) should be appropriately adjusted according to statistical data and business changes. Eight. The performance service is obviously IO-intensive, so there is no calculation, mainly calling various external services and waiting for IO to return. Therefore, these thread pools used to make requests can be configured larger, and the main thing is HTTP connection pool. However, it is not appropriate to set the connection timeout and read timeout too large.
- Previous article:Which module of SMS gateway is responsible for caching?
- Next article:About SMS Prompt of China Merchants Bank
- Related articles
- How to write the accounting entries for CCB¡¯s recovery of loan principal and interest?
- How does the mall access the WeChat payment mall and how to access the WeChat payment service?
- The most effective method of anti-MLM
- Warm sentences to comfort sick friends and family.
- Good morning: the sense of security is the stability after the dust settles, and the belief of never giving up.
- My friend sent me a message in Pinduoduo. Where can I see it?
- How to check the results of secondary vocational school to higher vocational school in 2008?
- What are the better insurance sales pitches?
- I always get junk messages from Unicom cards. How to deal with it?
- What is short message service?